I have some inputs and some TextAreas in my myEditPage.aspx
page and I wish to upload them to a database but to do so I need to link a <a href="..">
to a function in my myEditPage.aspx.cs
.
How can I do so?
A function-call expression has the value and type of the function's return value. A function cannot return an object of array type. If the function's return type is void (that is, the function has been declared never to return a value), the function-call expression also has void type.
We can call a C function from Python program using the ctypes module.
You call the function by typing its name and putting a value in parentheses. This value is sent to the function's parameter. e.g. We call the function firstFunction(“string as it's shown.”);
Instead of
<a href=.....>
use
<asp:LinkButton id="myid" runat="server" OnClick="MyFunction_Click" />
LinkButton is an ASP.Net server side control
Of course, you can attach a function to an <a>
tag as well. Just make it a server control by adding runat=server to it.
<a href="#" runat="server" onServerClick="MyFuncion_Click" />
Then in your function retrieve the values of your textareas and inputs.
In general, use asp.net controls instead of regular html controls. It makes it easier to program asp.net.
For textarea/input use <asp:TextBox>
. If you google a bit you will find many tutorials to get you started with asp.net programming. For example: http://www.asp.net/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With