473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Getting variable of the codebehind in the JavaScript

I want to access the variable in the codebehind in the javascript
How can i do that

Varun
Nov 22 '05 #1
4 1357
What is the exact need for referencing a codebehind variable in Javascript
you can have a control, say hidden textbox that always stores the variable value. Can then access this hidden input type in ur javascript

Nov 22 '05 #2
Cor
Hi Varun,

I would start, as I was you, with the answer from Suma.

Make a textbox, make it visible = false and enter the text value in your
page in that using your javascript.

Than you can get that as the
textbox.text in your code behind.

This is not the only possibility but surely the most simple to do.

Cor


Nov 22 '05 #3
I am assigning some values in the codebehind page and want to manipulate them value in the javascript
I feel hiddentext field is not a feasible for my problem i already had this idea
But it is not the feasible way to do as i want to atleast 20 variable of codebehind

Varun
Nov 22 '05 #4

Maybe RegisterClientscriptblock might help you.
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Varun | last post by:
I want to access the variable in the codebehind in the javascript How can i do that Varun
3
by: Parveen | last post by:
I have a boolean variable defined in the aspx.cs code for my webpage. I need to read the value of this variable in the javascript code that i have in the codebehind file. Is there a way to do...
2
by: exshige | last post by:
I read from some book that you can actually on any tag in the html page put a onClick or something and assign it with the sub/function name that is in the codebehind. I tried but it say name...
2
by: Alex | last post by:
Hi all, I'm writing a small web application which searches a database based on a date field, and populates a datagrid control with the results. The datagrid control has selection buttons added...
1
by: Machi | last post by:
let say i have a web form with a button on it ... when i click the button, it will pop up one small window to allow me to save a pdf file, everything is done using code behind as below ... however,...
2
by: Ekken Zuiber | last post by:
hiye people, i know this have been ask multipletimes over the past year, but i cant find any here in the new group so here goes.. in my code behind, i'm going to do some validation and use...
10
by: darrel | last post by:
I have this structure: mypage.aspx (class = mypage) myusercontro.ascx On the mypage.aspx I can declare a variable: animal = "monkey" I can read this from the UC by simply doing this:...
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
1
by: kamalkns | last post by:
hi I want to pass my value from Javascript to CodeBehind Without Using PostBack urgent Plz regards kamal
6
by: breckherbytes | last post by:
Im using Anychart and I pretend to update the point value automatically after the Table1 is update in database. Well Im new in ASP.net , and I expect that the javascript function should update the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.