Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 21st, 2004, 05:18 AM
Authorized User
 
Join Date: Aug 2004
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default return a string with all HTML and ASP tags strippe

I want to create a function tries to return a string with all HTML tags stripped from a given str.

I want only data without html tags.

How can i do through VB's exists function.

Pls guid me.

~thanks
  #2 (permalink)  
Old September 23rd, 2004, 10:41 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if your html is well formed you can load it into an XMLDocument and get the Text property of the DocumentElement. Something like this (check the Syntax!)
XMLDocument doc = new XMLDocument();
doc.Load(somefile.html);
Console.WriteLine(doc.DocumentElement.Text);

  #3 (permalink)  
Old September 23rd, 2004, 10:43 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if your html is well formed you can load it into an XMLDocument and get the Text property of the DocumentElement. Something like this (check the Syntax!)
XMLDocument doc = new XMLDocument();
doc.Load("c:\somefile.html");
Console.WriteLine(doc.DocumentElement.Text);

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a given string to html table in asp,net ostwald ASP.NET 2.0 Professional 2 September 10th, 2007 04:44 AM
Render HTML tags jacksprophet XSLT 1 December 28th, 2006 07:03 PM
asp server controls Vs HTML tags saurabh321 ASP.NET 2.0 Basics 1 November 3rd, 2006 04:33 PM
HTML tags is not working in textarea in ASP.net suman9730 General .NET 1 May 23rd, 2006 04:48 AM
html tags in asp:textbox sureshbabu VS.NET 2002/2003 2 May 3rd, 2006 12:30 AM



All times are GMT -4. The time now is 12:56 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.