You have two buttons in web form and i clicked on one of
the button, so how do i find which button i've clicked on
the form in my page load?
Answers were Sorted based on User's Feedback
Answer / vijaykumar
Just write code on page load
Response.Write(Request.Form[1].ToString());
u got button name which one u clicked.
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / thiyagu
In page Load
Page.Request.Form.Keys
will get which button is clicked
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / guest
you can get the button name with request.forms collection
in the page load.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / gaurav joshi,mohit jethva
i have two button btnadd and btnupdate
If (Array.IndexOf(Request.Form.AllKeys, btnadd.ClientID))
{
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rathore kuldeep
Request.Form("bsubmit")="name of button"
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / richard des jardins
I'm not real sure where you are trying to get this
information. Lets say you have two buttons whose
OnClick="MyButtonClick". The void MyButtonClick(Object
sender,EventArgs e) exposes the Button Object with the
sender reference. Cast the sender to a button and do what
ever you want with it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nithya_raghu
the above code was returning the hidden field value. which
will be non readble format.please make sure before entering
the answer will it work or not.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / bose
due to the question i have one doubt?
The click event is done while i creating the web
application time or after the deployment?
| Is This Answer Correct ? | 0 Yes | 2 No |
What is the use of The Page.Master Property?
What type of code, client-side or server-side, is found in a code-behind file of a Web page?
What?s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?
Exception handling
If 200 is for all successful operation then why do we have 201 response codes?
What are the different types of validation controls provided in ASP.NET?
0 Answers Sans Pareil IT Services,
When is an object collected by the Garbage Collector? [Four options were given]
What are the namespaces used in asp.net mvc? : asp.net mvc
Explain the difference between an exe and a dll?
Explain the difference between overriding and overloading?
1.how to encrpt query string in asp.net? 2.there are 10000 records then i wnat display 5000 records one gridview and 5000 records another grid view what is the process?
Is post back property in asp net?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)