Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by MaryDia

  1. MaryDia

    How to send smtp mail with smtp authentication

    You can try this: Step1 (code): SmtpMail.SmtpServer = "mail.company.com"; SmtpMail.Send(from, to, subject, body); Step2(config SMTP): IIS => Default SMTP Server Mail go to Properties (right click) and on tab "Access" you'll find "Authentication" (you have to test the possibles...
  2. MaryDia

    How do I set up the proxy for a web request?

    You can try this: WebRequest myWebRequest= WebRequest.Create("http://..."); //set the proxy to a correct value. WebProxy proxy=new WebProxy("myproxy:80"); proxy.Credentials=new NetworkCredential ("username","psw"); myWebRequest.Proxy=proxy; Hope this help, Mary
  3. MaryDia

    How do you loop thru a DataView ?

    DataView supports searching using the Find and FindRows methods. Ex for Find: DataView vue = new DataView(tbl); vue.Sort = "ContactName"; int intIndex = vue.Find("Fran Wilson"); if (intIndex == -1) Console.WriteLine("Row not found!"); else...
  4. MaryDia

    C# Graphics Programming

    http://msdn.microsoft.com/vcsharp/downloads/samples/23samples/default.aspx You'll find here an useful example of creating a user control that displays a pie chart or bar graph based on supplied data (at the section: "Using GDI+ with C# (GDIPlusSample.exe)" ). Hope this help, Mary
  5. MaryDia

    Placeholder, User Control and URL

    You can put the placeholder in a new form in your asp.net page (in this case you'll have 2 forms in that page, and the second form will be responsable for the link you redirect). Hope this help, Mary
  6. MaryDia

    convert string to float

    Suggestion: double fcost = Convert.ToDouble(TextBox9.Text); float result = (float)fcost; or float fcost = (float)Convert.ToDouble(TextBox9.Text); There is no direct convertion from double to float. And, "For a conversion from double to float, the double value is rounded to the nearest...
  7. MaryDia

    DataGrid Header & Data row properties

    Yes, it is possible. 1. In the page (.aspx) you can set in the properies of Grid the HeaderStyle (you find in this section HorizontalAlign) and ItemStyle ( HorizontalAlign property). 2. In .cs: DataGrid1.HeaderStyle.HorizontalAlign=HorizontalAlign.Left...
  8. MaryDia

    DataBinding in DataGrid

    You can bind an array as datasource for a grid (in this case for example, the first array of jagged array),and can see the values that are containd in it: string[][] arr = new string[2][]; arr[0] = new String[] {"a","b"}; arr[1] = new String[] {"c","d"}...
  9. MaryDia

    Open an excel application with .NET

    http://www.c-sharpcorner.com/winforms/ExcelReadMG.asp
  10. MaryDia

    Parsing Strings in C#

    You can use some of the Char methods to parse the string( Char.IsLetter, Char.IsNumber, Char.IsPunctuation, Char.IsSeparator, Char.IsWhiteSpace....). And a short example: String s = &quot;123sgjhfg&quot;; String s1 = &quot;&quot;; for(int i=0; i < s.Length;i++) {...
  11. MaryDia

    New type of data.

    You can look for &quot;struct&quot; in MSDN, C#. And a short sample: public struct Point { public int x, y; public Point(int x, int y) { this.x = x; this.y = y; } } Hope this help, Mary
  12. MaryDia

    DataGrid - Conditional ROW color

    This is an example: foreach(DataGridItem item in DataGrid1.Items) { if(item.Cells[3].Text.ToString() == &quot;154&quot;) { item.BackColor = Color.Blue; item.ForeColor = Color.Red; } } Remark: in 'Cells[3]', 3 is the position of column in datagrid (in this column is the value you look...
  13. MaryDia

    DataSet is empty (new Windows Form)

    As I see in you code, you make &quot;Dataset1 dataSet = new Dataset1();&quot;. First of all, make sure that 'dataSet' contains any data after this operation. Mary
  14. MaryDia

    New type of data.

    Try with TypeBuilder.CreateType() ---you can read more informations about this method in MSDN. Hope this help, Mary
  15. MaryDia

    CheckedListBox Help for Newbie?

    Actually: for (int i=0; i< checkedListBox1.CheckedItems.Count;i++) { label1.Text += checkedListBox1.CheckedItems[i].ToString(); }

Part and Inventory Search

Back
Top