E
E
e1s2015-11-06 10:53:50
HTML
e1s, 2015-11-06 10:53:50

How to pass parameter to button click handler in asp.net?

I have an element
<input id="f" type="file" />
and a button on my form.

<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />

How to pass the path value that is selected in input to the button click handler?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Danilov, 2015-11-06
@e1s

Assign a name to the imput such as Name
Then in the handler ask:
string fText= Request.Form["Name"];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question