It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I am new to asp.net. I am using "tinymce", there I am using html tables. On click of a button it's throwing an error:
A potentially dangerous Request.Form value was detected from the client
(txtspecification="<table border="1" ce...").
Can anyone please help me in solving this? Thanks in advance.
Your problem will be that you are posting back to an ASP.NET page which has 'request validation' turned on. Essentially, the HTML from tinymce will contain angle brackets and that (amongst other things) will trip ASP.NET's security checking functionality (which is trying to trap cross-site scripting attacks). You can turn off request validation in the ASP.NET page.
Turning off request validation in page using page directive:
<%# Page validateRequest="false" %>
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have googling this for weeks now and i can't find a nice answer and uique way to do this.
I have a symfony2 application that is using FOSUserBundle. The app is available in different languages.
What i would like is to have an unique way to handle the locale detection. Since it has been moved from the session to the request i don't see a clear way to achieve that.
step a) user is not logged, maybe 1st time we saw it. Take the locale from the request header Accept-Language:en-US,en;q=0.8,fr;q=0.6 (for instance). Serve the user a localized version of login page
step b) user is now loggued in. of course we still serve him is prefered language based on the same header
So far i have done this using ResponseListner but it seems it won't work for the 1st request and have troubles with the FOSuser login page.
Any help with samples would be very appreciated.
LuneticsLocaleBundle is great for that: https://github.com/lunetics/LocaleBundle
It allows you to create a custom Locale Guesser:
https://github.com/lunetics/LocaleBundle/blob/master/Resources/doc/guesser.md
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Im a newboy in .net please help ,I am using a Session Variable for storing some values in aspx Page. Actually I want to clear session values when user Leave page to go other page. I know there is PageUnload Event where I can Clear Session but i need to clear session only after the User leaves a Page.
Is there other way to clear Session variables in aspx page.???
On the other pages , where you are going after leaving current page, use..
Session.Remove("Variable_name"); .
Session.Contents.Remove("mysession");
or
Session.Contents.RemoveAll()
Session variable is for storing data that is using for single user in all pages. You don't have to use it in your scenario. Use ViewState or page variables against.
Remember to clear only the values you need to, however if you want to clear the entire session then:
Session.Clear()
Session.Abandon();
or more effective
Session["your_session_name"]="";
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How to disable the browser back button in asp.net 4.0 on single or double click of browser?
please respond me quickly.
asp.net is a server side script and can't change anything in the browser, which is on the client side.
There is no way to do it. Becaus this functionality is build in browsers, not in you website. The only way to make a workaround is to open some window without button panels, though this won't help for all browsers.
You can send javascript back to get the behavior you want.
As the following article shows you have two options:
Open in a new window.
Use history forward to disable (to the user) the functionality.
http://viralpatel.net/blogs/disable-back-button-browser-javascript/
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
how would i be able to achive something like php's
if($_SERVER['REQUEST_METHOD'] != 'POST')
using vb.net - im trying to prevent people from accessing a webpage unless they are directed there by a form post.
Thank you
The HttpRequest object has a HttpMethod property which would indicate this. This object can be accessed by the Request property available on the base Page class (so from any page).
It's worth noting that this isn't a way to "secure" a page. Anybody can make a POST request, they don't need to have been "directed there by a form."
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
when and where we will use user control ? actually i want to ask it's best practices.
i have read on msdn about user control there it was written .
At times, you might need functionality in a control that is not provided by the built-in ASP.NET Web server controls. In those cases, you can create your own controls. You have two options. You can create:
"User controls= User controls are containers into which you can put markup and Web server controls. You can then treat the user control as a unit and define properties and methods for it."
i confused from first statement ? what he want to say ?
When we want to reuse code.