This is a migrated thread and some comments may be shown as answers.

Submitting Data to ASP.Net Forms (Requires a name element, not just an id)

1 Answer 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
TazDeveloper
Top achievements
Rank 1
TazDeveloper asked on 22 Dec 2011, 02:10 PM

I am posting this, because I might not be the only one who will come accross this situation.  I finished creating a form using the Kendo widgets and was testing it out by having the form submit to a traditional asp.net webpage.  I forget sometimes as a .Net developer that Microsoft handles a lot of things for us in the background.   Mostly because there is only one form allowed in a traditional .net webform page.  I recently moved to MVC.Net and love the fact that I can now have multiple forms with different actions.  I submitted my form and found no data in querystring or params for both methods.  I fixed the situation by adding a name element to my inputs.

If you are only accustomed to traditional Asp.net, as I was, you might not realize that you require a name element in your HTML inputs when submitting data to a webform page.  All of the Examples provided by the Kendo UI team are only providing the id element.  If you plan to use Kendo UI with traditional web forms coming from an HTML forms post to collect the data, remember to add the name element.  If you don't, you will find none of your data on the submit action. 


<input
class="OriginInput" style="width: 275px;" id="ORIGIN" name="ORIGIN"/>

I hope this helps someone else.

Cheers,
       Paul

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 22 Dec 2011, 02:17 PM
Hello Paul,

The discussed topic is described in the W3C specification:

http://www.w3.org/TR/html4/interact/forms.html#successful-controls

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
TazDeveloper
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or