Click here to Skip to main content
11,634,568 members (72,837 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET

I have a hidden field
<asp:HiddenField runat="server" ID="hdnRow" />
in my aspx page. adding values into this hidden field in
a button click at client side using javascript. i want to get the values
of hidden field in server side without postback. how to get the hidden field value?

is it possible using ajax?

Posted 24-Jan-13 0:36am
Edited 24-Jan-13 1:29am
Azziet at 24-Jan-13 6:41am
question is not clear...please give more details
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Yes It's possible with Ajax Async Postback.
You can simply place the Button inside Ajax Update panel & postback it Asynchronously without posting back the whole page.

Secondly you can use jQuery to call Server side method Asynchronously & just pass the Hidden filed value while calling the Server side method & catch this value in your Server side method.

So if you know how to implement these 2 techniques then I'm sure you can get your Solution.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Put the hidden field in in Update Panel to get the value at server side.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,736
1 Sergey Alexandrovich Kryukov 8,359
2 Mika Wendelius 6,845
3 F-ES Sitecore 2,354
4 Suvendu Shekhar Giri 2,205

Advertise | Privacy | Mobile
Web03 | 2.8.150728.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100