2
Answers

Why am i always getting null?

shosho s

shosho s

9y
303
1
var selectedID= $('#@Html.IdFor(m => m.StudentId)').val();
 Note: This value is a dropdownlist is read from a dropdownlist when the page loads.
 
 why is this always giving me the result of  "  " when im using it in my view (mvc)??
but when i write it in console im actually getting the value of the Id.
 
Can someone please help me out?
Thank you in advance. 
Answers (2)
0
Administrator

Administrator

Admin 2.3k 1.3m 22y
I have a specific problem as follows. See i have one button and i have written a function onclick of this button in my code behind form. ok. Which will be executed when that button is clicked. But that code is server side. Now I want to check if any of the checkbox in my datagrid is checked or not on click of this button? how to do this? Please help? Regards. kash
0
Administrator

Administrator

Admin 2.3k 1.3m 22y
Is there a specific question here? You can still have javascript error checking with asp.net validation controls by the way.