Subhash Sharma

Subhash Sharma
Subhash Sharma

This is Subhash Sharma(Software Engineer) Blog

Welcome to this blog and find every solution.............

Search This Blog

Software Engineer(Subhash Sharma)

Software Engineer(Subhash Sharma)
Software Engineer

Wednesday, December 29, 2010

Send data through Post Method

///Where you use Post Method in page u have to set inside the web.cofig
and inside the system.web>--- pages enableViewStateMac="false">

//aspx Source page

form id="form1" method="post" action="http://localhost:1984/Test/get-posted-data.aspx" runat="server">
User : asp:TextBox ID="txtName" runat="server">/asp:TextBox>
Password : asp:TextBox ID="txtPassword" runat="server">/asp:TextBox>
asp:Button ID="btnSend" runat="server" Text="Send"/>
/form>

//Retrive value through Post Mehtod

// string[]s= Request.Form.AllKeys;//through this u can find all the value of post....

Response.Write("User : " + Request.Form["txtName"] + "
");
Response.Write("Password : " + Request.Form["txtPassword"] + "
");