Accessing Client side variable from server side code?


 I am trying to use vbscript to run a process on the client machine. Once that process finishes I want to use the resulting value in my server side code behind file. Does anyone know a way to do this?

 I know that I can set server side session objects to a client variable by doing something like this:

<script language="vbscript" type="text/vbscript"> 

strSubject = <%=Session.Item("Subject") %>


 but I have no idea how to do that in reverse.



8/29/2007 8:30:44 PM 24353 articles. 1 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 54

Filed under: too much coffee.  LOL!

Just put the value into a hidden field and you can access it on both client and server-side.

Hope this helps!  Please mark the helpful post(s) as Answer.

Josh Stodola ← Come check out my blog!
8/29/2007 8:55:22 PM

Similar Artilces:

Client side code accessing server side variables
I am attempting to send a variable value from C# to the page for Javascript to access and use.  Basically I am using a prompt window in my server side javascript to capture a value and update the database with it.  If the value entered is not unique (because this is a unique identifier) I return a value indicating this.  I want this value available to my javascript code so I can provide an alert message telling the user to try again with a unique value.  If there is a way to make the message come right from my C# code behind page that will work for me too. Thanks ...

Accessing server-side variables from client-side events
This is a multi-part message in MIME format. ------=_NextPart_000_00E8_01C04D70.7EAC7080 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In a client-side itemchanged function, how can I set a server-side = variable?? I simply need to execute the following: psSession.SetValue("userID", user_id); I'm sure there's a way to trigger server-side script and pass in = variables. Any suggestions?? Thanks. ------=_NextPart_000_00E8_01C04D70.7EAC7080 Content-Type: text/html; charset="iso-8859-1" ...

Loading client side variables from server side code
Just curious whether anyone has seen a better way to implement the following. It doesn't seem like the best way! What I'm doing is passing in an array of values to the client via server side code. The reason for this is because I'd like the server to do most of the crunch work and then pass the final results to the client. I use the 'onload' event of an image. code behind: imgLoader.Attributes.Add("onload", "Init('Tag1;Tag2;Tag3')") client-side. The page also contains an image called 'imgLoader'. var Entities = new Array(); function Init(s) ...

Accessing Client side variable on Server side (PostBack)
New to ASP.NET. Can anyone tell me how to access client side variable on server side ie. while postback thanks, The best way to access arbitrary clientside values from the serverside is to store the values in a hidden input instead of a variable. How to access the client side variable from the server side variable in case of the htc file. You can use hidden variables. Here's an excellent post that will guide you in the right direction : Hi...The Client side variable's value can be&nb...

Client side code to pass values to server side variable?
Hi there, I have ListBox_SelectedTextChanged() method that creates another list box in the runtime as follows: // Get Action Level List lbxActionLevel = new ListBox();lbxActionLevel.ID = "ddlA" + i.ToString(); lbxActionLevel.Width = 100; lbxActionLevel.Rows = 2;SqlDataReader dr = new BusinessLogicLayer().bllGetActionLevels(); lbxActionLevel.Items.Clear();while (dr.Read()) {ListItem lAction = new ListItem(); lAction.Text = dr.GetString(1).Trim();lAction.Value = Convert.ToString(dr.GetInt32(0)); lbxActionLevel.Items.Add(lAction); lbxActionLevel.SelectedIndex = 0; } I ...

client side code & server side code
what is the difference between client side coding & server side coding ? when to use client side & server side code? Client side code runs on the user's browser and includes languages such as javascript and vbscript. Server side code runs on the web server and can be written in languages such as ASP.NET, PHP, ASP, ColdFusion etc. Website Design Darlington - - Experts, Information, Ideas & Knowledge - An online resource for professional ASP.NET developersPlease remember to click "Mark as Answer...

client side and server side code
Making things clear:When creating a web application one must know the difference between client side code and server side code.client side code is the code that is executed on the computer of the user. server side code is the code that is executed on the ....server.why is there client side code and server side code?well... server side code exist for the reason of sharing data with multiple users. for example: accessing a database.ASP.NET is a server side technology. in you can use different languages such as VB.NET or C#.client side code is used to perform tasks on the computer of th...

Is it possible to call client side function from server side code without initial client request?
Atlas is great. I'm using timer to periodically check database changes on server to populate client side controls with new data. Is it possible to do it without a lot of client requests to server which takes a huge useless network traffic? Server should call client side function on all connected clients when, for example, 'database updated' event occurs on server. Thanks. Hi~ Just for your interest, I think you could have a look at Comet, many web IM like Gmail's embeded Gtalk and are built on this architecture你好! Just FYI o_O...

Newbie Dev: Passing/Saving variables client side to access server side.
Hello, As you might have guessed by the title of the thread I am really new to this, this is my first proper development project and my first go at ASP.NET... so as you can imagine I could do with some help! :S As the title suggests I am having trouble thinking of a way to access variables, when it comes to seperate client and server side processing. I am accessing my database through a webservice so dont want to re-fresh every time the user performs an action so I have a grid that I am adding and subtracting from on the client side using JScript what I would like to do is stor...

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click ( and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped you...

how to transfer client-side variable to server-side
hi all, i need just a small hint on how to go on... i am adding attributes to a rows in a gridview when data is bound e.Row.Attributes.Add("onClick", "MySelectedRow.text = '" + e.Row.DataItemIndex.ToString() + "';location.href='admin_contact.aspx'") this allows me to store the selected row in a hidden field (MySelectedRow). after the page is being resubmitted it resets the value of the hidden field to null. i need to have the value on the server-side. i prefer not to do the querystring unless you know how to clear the querystring i...

Getting my client-side variable over to server-side
Ok so I have looked at a few posts on this subject and I can't quite figure out how to apply the idea to what I am doing here. I am using javascript to take amounts from 7 different textboxes and add them up on the fly, dropping the total in the 8th textbox. After they fill in that information they click button (postback) to continue throughout the form... what I need is for the "textboxTotalAmt" to move from client-side to server-side.  So I can access that total amount later in the form. Here is the Javascript piece... <script type="text/java...

Client side to execute server side code
I am maintaining an ASP.NET C# application written by someone else.  I am essentially a newbie to web development especially client side stuff.  Based on reading these forums I understand that I can't directly call a server side method from the client side and I have to use post pack in some way (using a webservice is not an option here).  My confusion comes from the HTML setup being used.The page has three frames; a header, body and footer.  Each frame is filled by it's own ASPX page.  The footer contains buttons for navigating to another page and some of the b...

How to Excecute Server side code in Client Side
I have a Textbox with linkButton on right side.  if i click linkbutton i have one text box agian in poup. if we enter some text and click search button i am showing ListView with searched data in Poup. the Listview contains one Radio Button at eash row. Now my request is if i select one radiobuton and click "OK"  the poup should close and display the selected row text in TextBox in my Page where the Linkbutton Presents. i can do it on my server side on "Okbutton_Click" . i wabnt to do this in Client side only with out PostBack.   Is ther...

Web resources about - Accessing Client side variable from server side code? -

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: ...

Accessing the Future Fund a sensible proposal, says super expert Daryl Dixon
As portfolios go, the Future Fund's asset allocation is concentrated in higher-risk investment, including equities and alternative assets.

Accessing my Super
I'm 57 - can I access my super?

Australia, US accessing Indonesian telephone data, leaked documents show
Newly disclosed documents from former US intelligence contractor Edward Snowden have revealed that Australian intelligence efforts against Indonesia ...

Euthanasia advocate Philip Nitschke detained at Melbourne Airport, accuses Customs officials of accessing ...
Euthanasia advocate Philip Nitschke has accused Customs officials of accessing hundreds of patients' sensitive records on his laptop after detaining ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 12/7/2015 12:19:48 AM