I send data in this way:
<form method="post" enctype="text/plain action="Func">
And I have a function:
protected void Func(object sender, EventArgs e)
How Can I get data which I sent?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the signature of your method it looks like you’re using WebForms. Is this right? If so, in WebForms you don’t write the
<form>tag like this, it’s easier to create a new ASPX page (Web Form) and use the default. Everything on the page goes in one form. To “get the data”, you just access properties on your page’s controls, e.g.myTextBox.Text.If you’re coming from PHP and this all sounds a bit weird, you may want to be using ASP.Net MVC. In which case, it’s generally easier to use an HTML Helper method for the form, something like:
But then the signature of your method is all wrong, you’d be better defining a View Model class, and having something like: