How to create sessions on html button [Resolved]

Posted by Self-Innovator under ASP.NET on 8/6/2014 | Points: 10 | Views : 533 | Status : [Member] | Replies : 1
Hi i need to create sessions on html button .

I tried but noe works
<button type='button1" text="Submit"/>
Page_Load()
{
Session s=new Session();
s=button1.value;
response.write(s.tostring());
}


Join Hands Change lives
Thanks & Regards
Straight Edge Society



Responses

Posted by: kgovindarao523-21772 on: 8/7/2014 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Hi,
Specify a name to the button:
<button name='btnSubmit' type='button"  value='YOURVALUE'>Submit</button>


Now,
s=Request.Form['btnSubmit'];

Session['btnSumbit']=s;


This will gives you the button value

Thank you,
Govind

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response