TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hinal Shah
NA
20
7.3k
Access Hidden field value in WebMethod
Jun 8 2017 8:15 AM
Hello ,
I want to access hidden field value to the server side in asp.net in webMethod.
here is my code:-
function BtnGetData() {
var rr = $("#ddlAssignUser option:selected").length;
$("#hidUsercount").val(rr);
$.ajax({
type: "POST",
contentType:"application/json; charset=utf-8",
dataType:"json",
url: "AssignTender.aspx/GetData",
data:"{}",
success:function(data){
var obj = data.d;
alert(obj);
},
error: function (result) {
alert("error");
}
});
}
</script>
here i am using html tag in asp.net application because of requriement...
here is my html tags:-
<select id="ddlAssignUser" class="form-control" runat="server" multiple="true"> </select>
<input type="hidden" id="hidUsercount" runat="server" name="hidUsercount" />
Now using jquery i have get the length of ddlAssignUser and store it in the Hiddenfield.
I want this HiddenField value to access on server side in WenMethod.
Reply
Answers (
1
)
Factory pattern
Convert XML file into Excel file in C# MVC