I have two pages one contains a grid, the other page contain form view, and a custom text editor control. What happen is when i click on a button it will populate the textbox with html from a vairable, i have a back button at the top of the form which will navigate back to the page with the grid view, that when i recieve the errors below. I turn ValidationRequest="false" on the page with the gridview. Now after checking it seems that when i click the template button, it will send a call to a function i created depending on which link that was clicked it will load that template into the richtext editor. That when i keep getting the application error below. How do i get rid of this problem?
Function To Populate the richtextbox
protected bool Display_MailForm(EmailType type)
{
bool okToSend = false;
string state = this.state;
string vehicle = this.vehicle;
string vehicleYear = this.vehicleYear;
string message = string.Empty;
string subject = string.Empty;
switch (type)
{
case EmailType.Confirmation:
subject = Websubmission.ConfimationSubject;
message = string.Format(Websubmission.ConfirmationTemplate, this.fullName.Trim());
break;
case EmailType.InitialResponse:
subject = state == string.Empty ? Websubmission.InitialResponseSubject.Replace("{0}", "") : string.Format(Websubmission.InitialResponseSubject, state.Trim()); // State
subject.Replace(" ", "");
message = string.Format(Websubmission.InitialResponseTemplate, this.fullName.Trim());
break;
case EmailType.Decline:
subject = state == string.Empty ? Websubmission.DeclineSubject.Replace("{0}", "") : string.Format(Websubmission.DeclineSubject, state.Trim()); // State
subject.Replace(" ", "");
message = string.Format(Websubmission.DeclineTemplate, this.fullName.Trim());
break;
case EmailType.Followup:
subject = MsgHelper(Websubmission.FollowupSubject, vehicle, vehicleYear); // Year & Name of Vehicle
subject.Replace(" ", "");
message = string.Format(Websubmission.FollowupTemplate, this.fullName.Trim());
break;
}
this.txtTo.Text = this.email;
this.txtSubject.Text = subject;
this.txtEditor.Text = message;
okToSend = true;
//((IPostBackEventHandler)lnkPanel1).RaisePostBackEvent(null);
//this.ModalPopupExtender1.Show();
return okToSend;
}
Which will call any number of properties like this.
public static string InitialResponseTemplate
{
get
{
return "<p>Dear {0},</p>"
+ "<p>Thank you for contacting Alex Simanovsky & Associates, LLC, Consumer Protection Attorneys. Based upon the information that you provided, we believe that you may have a claim under the State Lemon Law, the federal Magnuson-Moss Warranty Act and/or the Uniform Commercial Code. "
+ "<br /> <br /><strong>In order to provide you with the most pertinent legal advise, we will need to review the following documents:</strong></p>"
+ "<strong><ol><li> ALL Repair Orders for your vehicle;</li><li>Your Purchase Documents (such as the Bill of Sale, Buyer's Order or Lease Agreement) and Finance Documents; and</li>"
+ "<li>The current Registration for the vehicle.</li></ol></strong><p><strong>Please fax these document to Toll-Free.</strong><br>"
+ "</p>After we receive the documents, a member of the firm will call you to discuss your options. If we accept your case, we will proceed on your behalf and charge the manufacturer our fees in addition to the settlement or judgment obtained. No attorneys' "
+ "fees will ever be charged to you for our legal representation. The sooner that we receive and review your purchase documents and work orders the sooner that we can begin working on a resolution to your matter. <br /> <br />We look forward to the possibility of working with you on your case. "
+ "If you have any questions prior to forwarding your documentation, feel free to call any of us at the number listed below.<br /> <br />Sincerely,<br />Jennifer Morton<br />New Client Coordinator<br />_________________________________________<br />Alex Simanovsky & Associates, LLC<br />Consumer Protection "
+ "Attorneys<br /> <br />Toll-Free: Extension 18<br />Toll-Free Fax: <br />Web: <a href=\"http://www.autolemonlaws.com/\">www.autolemonlaws.com</a><br />Email: <a href=\"mailto:info@lemonlawinfo.com\">info@lemonlawinfo.com</a></p><p>THIS MESSAGE IS INTENDED ONLY FOR THE "
+ "USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If the reader of this message is not the intended recipient or agent responsible for delivering the message to the intended recipient, "
+ "you are hereby notified that any dissemination or copying of this communication is strictly prohibited. If you have received this electronic transmission in error, please delete it from your system without copying it, and notify the sender by reply e-mail or by calling so that our address "
+ "record can be corrected. Thank you.<br /> <br />DISCLAIMER: This email correspondence does not create an attorney-client<br />relationship between the sender and receiver. This is merely a request for information. No attorney-client relationship is formed without a written terms "
+ "of representation.<br /></p>";
}
}
ERROR:
2007-09-25 14:55:37,612 [6] ERROR EmailLog [{log4net:HostName=win4}] - An error has occured in the Application_Error event
System.Web.HttpException: This is an invalid webresource request.
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)