Tuesday 29 May 2012

How to fetch TextArea value in .ashx file?

Definition: Fetch Textarea control value in .ashx file.

Example:
.Ashx file code:-

public void ProcessRequest (HttpContext context)
    {
        context.Response.ContentType = "text/html";
        try
        {
                  var comment = context.Request.Params["ctl00$ContentPlaceHolder1$txtComment"];                      context.Response.Write(comment);
         }
        catch { }
    }


Note:
contentplaceholder : because i have used Master Page.

No comments:

Post a Comment