I've got a page called SendEmail.aspx. In this page, I am looking for a Request.Querystring value which I put into a multiline asp:textbox.
As you can see, the entire body will be passed in the URL, and I am trying to replace the \n with newlines, so that the textbox has those linebreaks in it.PHP Code:
if(!(Request.QueryString["body"] ==null))
{
strBody = Request.QueryString["body"].ToString();
strBody = strBody.Replace("\n",System.Environment.NewLine);
}
This is how the call is done:
The problem is, the "\n" is not being replace with a newline. Instead, I get a space.Code:javascript:popBox('SendEmail.aspx?body=Hello how are \n you!?');
What can I do to get the NewLines in there for the textbox?




Reply With Quote