Wrox Programmer Forums
|
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 9th, 2009, 07:16 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Question Javascript value in vb.net code

Hi,

In an Javascript code, I am taking a value from User and this value I want in my server side code , vb.net,

What is the code for this.???


Thanx & Regards
Anup
 
Old December 9th, 2009, 10:35 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The short answer is that you can't directly do this. The method you use will depend on what technologies you are currently employing. If you are using Microsoft AJAX you can define a method with [WebMethod] and call it from within a JavaScript otherwise you are going to have to setup an AJAX style request, pass the variable to another page that will process it within the given method, and then return any results if necessary.

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
anup.maverick (December 10th, 2009)
 
Old December 12th, 2009, 05:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

the easy way is:
setting a control like hidden text (as server side) by ur JavaScript code
& then read it in ur Server side code

HTH
__________________
Always,
Hovik Melkomian.
The Following User Says Thank You to melvik For This Useful Post:
anup.maverick (December 14th, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sample code needed for Professional ADO.NET with VB .NET hughveal ADO.NET 21 July 9th, 2009 03:06 AM
How to Use JavaScript in an ASP.NET/VB page kwilliams ASP.NET 2.0 Professional 5 January 14th, 2008 03:30 PM
Timer:JavaScript or VB.NET gaurav_jain2403 Other Programming Languages 0 February 13th, 2006 03:15 PM
Can'T find code to Beginning Asp.net using VB.NET darruler All Other Wrox Books 1 August 12th, 2004 05:04 PM
Help 'beginning asp.net using vb.net' source code jkmf Wrox Book Feedback 1 January 18th, 2004 08:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.