Click here to Skip to main content
13,549,306 members
Rate this:
Please Sign up or sign in to vote.
See more:
how to get jquery varible value in c# server side?
Posted 17-Sep-12 19:42pm
Updated 17-Sep-12 20:22pm
Rajeev-Jayaram 18-Sep-12 18:31pm
Why do you need this? Any specific reason?
bhargavpp 19-Sep-12 1:20am
yes i have get value from client side using jquery and i want in server side for database insert
Rajeev-Jayaram 21-Sep-12 4:51am
For this requirement there are several ways that you can consider doing, see my answer below.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could store the value in a Hidden Field[^] from jquery and access it via code behind.

$('[id$="HiddenField1"]').val("Your Value");

<asp:hiddenfield id="HiddenField1" runat="server" value="1"/>


Alternatively you could use Ajax Jquery[^] to call a webservice to perform database insert.


Use Ajax Page Methods[^].

Hope it helps.
bhargavpp 22-Sep-12 5:46am
this is not working i can't getting any value in server side that is set by client side to hiddenfield
Rajeev-Jayaram 24-Sep-12 4:10am
Are you new to
bhargavpp 24-Sep-12 5:54am
i am not new in .net,we have all data bind from client side means data value is assign to control from Client Side that's way i am asking how to get client side .as per your idea i have tried it but not working.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03-2016 | 2.8.180515.1 | Last Updated 21 Sep 2012
Copyright © CodeProject, 1999-2018
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