|
How to turn the event validation on the form off in ASP.NET with c#
|
|
|
|
|
Can you elaborate a little bit ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hello Everyone,
I'm sending mail through ASP.NET and it's rocking. But whenever i'm trying to send the text given below then an error is occuring.
"Some formatted text like bold italic and etc"
Actually i'm creating my own emailEditor through which i can bold,italic and etc. facilities being provided.
And it's working great but as i'm sending normal text it's but as i provide some formatted text it's not..................
The code i'm giving below for sending mail.........
//For Sending The Mail
MailMessage mail1=new MailMessage();
mail1.To="mail@saamstesting.com";
//mail1.From="info@kiritbhaiji.com";
mail1.From="manoj.manojbisht@gmail.com";
mail1.Subject="Mail From Manoj Bisht";
mail1.Priority=MailPriority.High;
mail1.BodyFormat=MailFormat.Html;
string body=HtmlTextArea.Value;
mail1.Body=body.ToString();
try
{
SmtpMail.SmtpServer="127.0.0.1";
SmtpMail.Send(mail1);
lblMsg.Text="Mail Sent Successfully";
lblMsg.ForeColor=Color.DarkBlue;
}
catch(Exception ex)
{
lblMsg.Text=ex.Message.ToString();
lblMsg.ForeColor=Color.Red;
}
And the following error occuring
A potentially dangerous Request.Form value was detected from the client (HtmlTextArea="Manoj Bis...").
|
|
|
|
|
Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
See the search result
http://www.google.co.in/search?hl=en&q=Mail+A+potentially+dangerous+Request.Form+value+was+detected+from+the+client++asp.net&meta=[^]
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
First of all Thnx for suggesting me the link. But still there is a problem actually it's a problem as discussed above
The solution i got is given below
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Rough3.aspx.cs" Inherits="Rough.Rough3" validateRequest="false" %>
or
<%@ Page validateRequest="false" %>
But as i'm running my project it's throwing an parser error.........
|
|
|
|
|
Might be because you are assinging some different datatypes can you post the code where you are getting the Parser error. see the Event View of your OS
Menu ->Settings - Control Panel -> Administrative Tools -> Event Viewer
See the application error it might have written what's the error is
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Here is my code whr i'm getting the parser error
Server Error in '/Rough' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: There can be only one 'page' directive.
Source Error:
Line 1: <%@ Page language="c#" Codebehind="Rough12.aspx.cs" AutoEventWireup="false" Inherits="Rough.Rough12" %>
Line 2: <%@ Page validateRequest="false" %>
Line 3:
Line 4:
|
|
|
|
|
The Knowledge wrote: <%@ Page language="c#" Codebehind="Rough12.aspx.cs" AutoEventWireup="false" Inherits="Rough.Rough12" %>
Line 2: <%@ Page validateRequest="false" %>
Here is the error that clearly mentioned that it should have have only one page directive and you are using 2 Add second validateRequest property into first directive itself
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Yes Sir,
U r absolutely right. Actually i just forgot it and couldn't get the parser error correctly.............
One more question : Now i'm able to send the mail as i'm sending the bold text like name or paragraph at my mail i'm not receiving the text as bold.... I'm getting it like
"Strong then text closing Strong. like text or paragraph not as formatted text".........................
Wht should i do now to get the formatted text as i'm sending at my mail or recipient
|
|
|
|
|
Hi
I got a problem in ASP.NET [Frame work 2.0] WEB Application My Namespace is INVT.WEB i refer this in code behind as
<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="frmIndex.aspx.cs" Inherits="INVT.WEB.frmIndex" %>
I got the following error when i run this project.
Parser Error Message: Could not load type 'INVT.WEB.frmIndex'.
Regards
R.Palanivel
-- modified at 4:06 Wednesday 12th September, 2007
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
How DLL will create in custom controls(in our application)
pavan...
|
|
|
|
|
Can you elaborate your question a bit more? I don't quite get what you are trying to do here.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
how DLL file will be generated in .net?
pavan...
|
|
|
|
|
When you compile your project (Windows/Class library) check Jeffrey Richter's CLR via C# book
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
In composite control, i have created a child control....what are the arguments can i give for that child controls..
Thanks in advance
pavan...
|
|
|
|
|
Hi Everyone,
Using this function it opens the default mail application(msoutlook) but not attaching files. Can anyone help me in this regard.
Mtest = "<script language='javascript'> window.location= 'mailto:test@yahoo.com&subject=testing mail&body=testing&attachment=""""D:/test.log""""';</script>"
Regards,
Manowj
|
|
|
|
|
You can do this a lot easier with the MailMessage and SmtpClient class. That way you don't need javascript to send e-mail from your asp.net website.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Hi WillemM,
Thanks for your response. I need to popup the default mail client(Outlook express/ms outlook) with file attached in client side scripting not as a .NET user screen.
Regards,
Manowj
-- modified at 3:39 Wednesday 12th September, 2007
|
|
|
|
|
is that file is on client's machine?
I mean how can you use path like "D:\test.log" if its not on the client's machine
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
i have develped an application which supports three language spanish, english and french. i have used resource file to achieve this task. My problem is, i am having a web form which contains three label box first name, last name and middle name in resource file i have set the value for all the languages, is it possible to update resource programatically coz the client wants all the fields should be editable & correspondin value should be reflect at the resource file.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
how DLL's will be created in custom controls(in our application)
pavan...
|
|
|
|
|
Please delete this post as you already repost one more query
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
When ScriptManager Control is placed in Content Page the ScriptManager Control is underlined red thereby notifying about an error condition.
Error Condtion is :
"Element ScriptManager is not a known element. This can occur if there is a compilation error in the website."
How do I tackle this problem ?????????/
Sanjay Nicholas Piramal
|
|
|
|
|
Sanjay Nicholas Piramal wrote: When ScriptManager Control is placed in Content Page
I never used such control can you please elaborate some what so that will able to know What is Script Manager Control and why you put that one there
<edited> Again if you are adding anything directly in Master Page content Placeholder in Master it shows that one. Don't worry try to run the application and see what is result
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Try to add this line to your content page (at the top):
<br />
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %><br />
But I'm not that sure about it, because in some files it is present in some not ??
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|