Click here to Skip to main content
16,011,538 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Delete Temp File after N seconds Pin
Bassam Saoud9-Feb-07 22:58
Bassam Saoud9-Feb-07 22:58 
Questionweb service - how to setup access Pin
we_swati9-Feb-07 13:40
we_swati9-Feb-07 13:40 
AnswerRe: web service - how to setup access Pin
asithangae9-Feb-07 16:49
asithangae9-Feb-07 16:49 
QuestionSecurity ( redirect user to some forms in loggin according to ROLE) Pin
Islam Khalil Saber9-Feb-07 13:24
Islam Khalil Saber9-Feb-07 13:24 
AnswerRe: Security ( redirect user to some forms in loggin according to ROLE) Pin
kubben12-Feb-07 2:16
kubben12-Feb-07 2:16 
GeneralRe: Security ( redirect user to some forms in loggin according to ROLE) Pin
Islam Khalil Saber12-Feb-07 11:55
Islam Khalil Saber12-Feb-07 11:55 
GeneralRe: Security ( redirect user to some forms in loggin according to ROLE) Pin
kubben13-Feb-07 2:37
kubben13-Feb-07 2:37 
QuestionRegular Expression Question Pin
achimera9-Feb-07 12:54
achimera9-Feb-07 12:54 
Hi, I want to write a C# function to strip any HTML tag from a String -- not just the tag itself but also whatever is inside the tag... and also to handle the situation where there are nested tags.

I'm having a hard time trying to figure this out, and am hoping someone can help.

For example, lets say I have a String that contains HTML like this:

This is a test <tag>some text <tag> some more text </tag> possibly more text </tag>
and only a test.
I wish to get rid of everything between the <tag> tags... kill it completely... and end up with a string like this:

This is a test  and only a test.
I've been trying to make a function in C# simular to this:

public static String StripTags( String OldHtml )
{
    String NewHtml = "";

    NewHtml = Regex.Replace( OldHtml,
                             SEARCH_FOR,
                             REPLACE_WITH,
                             RegexOptions.IgnoreCase | RegexOptions.Compiled );

    return NewHtml;
}
The problem is I'm having a really hard time trying to figure out how to create the SEARCH_FOR and REPLACE_WITH portions for the RegEx.Replace above.

Any assistance would be greatly appreciated! Thanks!

And *NO*, this is not a homework assignment. I'm trying to create a text summary of HTML that can be displayed in truncated fashion... for forum software that I'm writing... but I need to remove certain tags. Thanks!!!
AnswerRe: Regular Expression Question Pin
Guffa9-Feb-07 13:05
Guffa9-Feb-07 13:05 
QuestionEmail Address Verification... Pin
code-frog9-Feb-07 12:36
professionalcode-frog9-Feb-07 12:36 
AnswerRe: Email Address Verification... Pin
User 17164929-Feb-07 13:43
professionalUser 17164929-Feb-07 13:43 
Question.dll ? A solution file not present Pin
lehya9-Feb-07 10:46
lehya9-Feb-07 10:46 
AnswerRe: .dll ? A solution file not present Pin
asithangae9-Feb-07 16:39
asithangae9-Feb-07 16:39 
Questionchange the webservice Pin
srinandan..9-Feb-07 8:24
srinandan..9-Feb-07 8:24 
AnswerRe: change the webservice Pin
kubben9-Feb-07 9:53
kubben9-Feb-07 9:53 
GeneralRe: change the webservice Pin
srinandan..9-Feb-07 20:35
srinandan..9-Feb-07 20:35 
GeneralRe: change the webservice Pin
kubben12-Feb-07 2:06
kubben12-Feb-07 2:06 
GeneralRe: change the webservice Pin
srinandan..12-Feb-07 3:15
srinandan..12-Feb-07 3:15 
GeneralRe: change the webservice Pin
kubben14-Feb-07 9:33
kubben14-Feb-07 9:33 
GeneralRe: change the webservice Pin
srinandan..15-Feb-07 0:19
srinandan..15-Feb-07 0:19 
GeneralRe: change the webservice Pin
kubben15-Feb-07 10:09
kubben15-Feb-07 10:09 
GeneralRe: change the webservice Pin
srinandan..15-Feb-07 20:47
srinandan..15-Feb-07 20:47 
Questionplaceholder control Pin
saravanan059-Feb-07 8:18
saravanan059-Feb-07 8:18 
AnswerRe: placeholder control Pin
kubben9-Feb-07 9:52
kubben9-Feb-07 9:52 
QuestionHow do i make entire row of a datagrid clickable Pin
NetBot9-Feb-07 7:53
NetBot9-Feb-07 7:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.