views:

77

answers:

1

This is my problem, I have one textbox, one button and one label. Everything is inside an updatepanel. Let's say I want to test if a valid html-tag is entered in the textbox when I press the button. In the code-behind I have a method for that.

Everythings works just fine, except when I actually enter a html-tag in my textbox. If I test < html>, it works. But not if I test .

So my question is, doesn't the updatepanel accept html-tags as parameters? Because my breakpoint for the button_click doesn't triggers.

Sorry for my bad english.. :)

A: 

Since you're in an UpdatePanel you aren't seeing the real error here...if you just remove the UpdatePanel and do a full postback you will.

Since you're entering an HTML tags, ASP.Net is stopping the postback because you're hitting Event Validation, which prevents symbols like < and > from being entered to prevent scripts attacks on your site.

See here for troubleshooting this and learn about your options. The short version is that by default you cannot enter HTML tags in the field, more specifically, you can't enter < and >

Nick Craver