Use the web browser control comes with .net. Here is a sample code to give you some idea. webBrowser1.Document.GetElementById("fieldname").SetAttribute("value", "foo"); webBrowser1.Document.GetElementById("button").InvokeMember("click");
Tamer Oz
Posts
-
how to display a string on website through windows form -
can any body tell me the answer for this...if you post the code block that giving this error we'd be glad to help. I don't think anyone here have that prediction ability.
-
How to scroll the scrollbar of treeview control automatically? -
Datagridview refreshes automatically reflecting changes in database?Sorry I thought you were trying to send data to database. Now i understood you are trying to refresh grid from database. data changes > trigger that broadcasts/sends a message > client application "listening" > performs a grid refresh is the best way i think
-
Datagridview refreshes automatically reflecting changes in database?By looking the question that he asked i think this method is adequate for this question. I agree that this is not the best way and not very efficient but anything not mentioned about performance, or other ways that already tried.
-
Datagridview refreshes automatically reflecting changes in database?I think you ment DataGridView Control by dgv?? If you are using dataadapter object you can easily reflect changes to db. All you need is a timer control, and calling update method of this adapter in Tick event of timer.
-
How to Find Website Visitor NoThis code is for current visitors on site if you implement Session_end event too. If you are trying to count total visitors you must use a database or any kind of data storage
-
how to delete mail from mail server using C#Could you try
private string GetResponse() { //read till finding new line, return. string strPrev = null; string strCurrent = null; string strMessage = null; NetworkStream ns = default(NetworkStream); ns = client.GetStream;//Previously instanced and connected TcpClient while (true) { byte\[\] buffer = new byte\[1\]; //read by 1 byte 1 byte ns.Read(buffer, 0, buffer.Length); strCurrent = System.Text.Encoding.GetEncoding(1254).GetString(buffer); strMessage = strMessage + strCurrent; if (strCurrent == @"\\r" && strPrev == @"\\n") { break; // TODO: might not be correct. Was : Exit While } strPrev = strCurrent; } return strMessage; } private void SendMessage(string str) { str = str + "\\r\\n"; //Controlchars.CrLf '10+13 byte\[\] buffer = System.Text.Encoding.GetEncoding(1254).GetBytes(str); NetworkStream ns = client.GetStream; ns.Write(buffer, 0, buffer.Length); }
-
how to delete mail from mail server using C#Everything seems ok. Could you pls send the SendCommandSynchronous method
-
Convert xml file to word documentAs an other way you can create office open xml file, but this way is much harder. For more information you can visit http://msdn.microsoft.com/en-us/library/aa338205.aspx[^]
-
Convert xml file to word documentYou can use word interop to write xml file's content to word document. If you google 'how to create document with word interop' you'll find tons of examples.
-
how to delete mail from mail server using C#If you are talking about Exchange server there is a web service of Exchange 2007 sp2, if you are talking about pop3 mail server you can try connecting to server by simulating telnet from your application and delete mail.
-
Start a Service after install it ? -
How to connect to remote sql server 2000 in Windows Services created in C#Seems like changing the connectionstring is enough to change database. Have you changed your connectionstring to connect another database. Is it possible for you ti share the code.
-
How to show a form from windows service?In service properties at Log On tab "Allow Service to interact with desktop" should be checked.
-
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.Try setting commands timeout property to a higher value
-
How to monitor http downloads and uploads?You can user PerformanceCounter component by setting CategoryName property to Network Interface and after selecting appropriate counter.
-
How to create an application that lists folders containing the most disk space?You can use the code below, but it may need some performance improvements
List<FileInfo> fi = new List<FileInfo>(); ListBox l = new ListBox(); private void Form1\_Load(object sender, EventArgs e) { } private void GetSubFoldersAndFiles(string path) { foreach (string d in Directory.GetDirectories(path)) { try { GetSubFoldersAndFiles(d); } catch (Exception) { } } foreach (string f in Directory.GetFiles(path)) { fi.Add(new FileInfo(f)); } } private void Form1\_Shown(object sender, EventArgs e) { l.Dock = DockStyle.Fill; this.Controls.Add(l); foreach (DriveInfo di in DriveInfo.GetDrives()) { if (di.IsReady) { GetSubFoldersAndFiles(di.RootDirectory.FullName); } } var a = (from s in fi orderby s.Length descending select s); l.DataSource = a.ToList(); }
-
Problem to Export DataTable to Excel. -
convert data in LINQ?For higher performance you can use Convert.ToInt32