You can also use RegEx to strip the html tags from the response. public string cleanHtmlTags(string inputText) { Regex objRejex = new Regex("<([^>]*?)>"); return objRejex.Replace(inputText, ""); }
"If knowledge can create problems, it is not through ignorance that we can solve them." -- Isaac Asimov
Daniel Bright
Posts
-
HTML code to .TXT -
Slashdot RSS Stylesheethttp://slashdot.org/slashdot.rss[^] "If knowledge can create problems, it is not through ignorance that we can solve them." -- Isaac Asimov
-
TcpListener Hangs at 4096 bytes?The BeginListener function will not receive any information from the socket past a certain amount (apparently 4096 bytes). Information sent that is smaller than that is received properly. If data is sent that is larger than that, it's truncated to 4096 bytes, and then the while loop exits (which it should never do).
private void BeginListener() { byte[] b = new byte[10000000]; int k; Socket s; String strMessage = ""; TcpListener newList = new TcpListener(10000); newList.Start(); while (true) { strMessage = ""; s = newList.AcceptSocket(); k = s.Receive(b); for (int nCounter = 0; nCounter < k; nCounter++) { strMessage += (char)b[nCounter]; } } newList.Stop(); }
private void SendCommand(String Address,String strTempFile) { StreamReader newReader = new StreamReader(strTempFile); String strSendString = newReader.ReadToEnd(); newReader.Close(); newClient = new TcpClient(); NetworkStream tcpStream = null; byte[] ba; try { newClient.Connect(Address,10000); tcpStream = newClient.GetStream(); ASCIIEncoding asem = new ASCIIEncoding(); ba = asem.GetBytes(strSendString); tcpStream.Write(ba,0,ba.Length); } catch (System.Net.Sockets.SocketException) { //Error Handling. } finally { if (tcpStream != null) {tcpStream.Close();} if (newClient != null) {newClient.Close();} } }
Any help would be greatly appreciated. -
Magic UI Tab control helpThanks Heath, Is there an easy way to check for the active control index? DB
-
Magic UI Tab control helpI am creating a simple tabbed text editor using the Magic .NET UI bits [http://www.dotnetmagic.com[^]]. My question is how do I programmaticly manipulate opjects that are on the tabs I create? In a non-tabbed form I would use:
richTextBox1.Cut(); //or richTextBox1.Copy();
but I cannot figure out how I can get to the textbox inside a tabControl page. Im sure that this is probably simple, but I cant find it. Any help would be greatly appreciated. I looked at the documentation here: http://www.dotnetmagic.com/articles.html[^]but I couldnt make any sense out of it. You can find the test project I'm experimenting with here: http://www.exceed-tech.com/misc/TabTest1.zip [^] -
Direct console output to a window -
Direct console output to a windowAnyone know where I could find a sample app that will run a console app & display its output in a windows form?
-
PDA'sI have a SL-5500 Zaurus, but I don't use it. I just ordered a Axim from Dell last Friday. My Z is in good condition if anyone is interested. I have all of the stuff (cables & CD) for it. I did find that the Open Source [http://openzaurus.org/\] ROM for it was pretty cool. It's better than the Sharp one, and doesn't include the useless java test apps & other junk.
-
Testers / Collaborators Wanted For Camel CPU Identifer / TesterI will test using my Dual Athlon boxes
-
Testers needed for anti-spam softwareI keep getting timeouts... I will try again. Please forgive multiple registrations, but I cant tell if my application has been accepted.