Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: server side values in javascript


Message #1 by "sundar srinivasan" <ssrinivasan3@n...> on Tue, 13 Aug 2002 20:33:18
Sundar,

try something like this:

<%@ Page Language="VB" %>
<%
With Response
	.write("<script language=""javascript"">")
	.write("var sAction = " & chr(34) & Request.QueryString("action") &
chr(34))
	.write("</script>")
End With
%>

Phil

-----Original Message-----
From: sundar srinivasan [mailto:ssrinivasan3@n...]
Sent: 13 August 2002 21:33
To: ASPX_Professional
Subject: [aspx_professional] server side values in javascript


In my .aspx page I have:

<script language="javascript">

var sAction = <%= chr(34) & request.querystring("action") & chr(34) %>

</script>

This works in asp, not in asp.net.

Why?

Sundar
---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces 
for developers who are already familiar with using ASP.NET. 
There is no trivial introductory material or useless .NET 
hype and the presentation of the namespaces, in an easy-to use 
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes, 
giving you those real-world tips that the documentation doesn't 
offer, and demonstrating complex techniques with simple 
examples.  

---

  Return to Index