20
Jul

Read server side code value in javascript

   Posted by: admin   in .Net Emperor

Hello Frieds

i was worked on one problem where i want some place session value in javascript and some place i want database value in javascript code.

so for these all i need i found one simple method for reading any server side values in javascript.

here is the few examples for reading server side values in javascript code.

1) var username=’<%=Session["username"]%>’;

2) var productid=’<%=Response.querystring["pid"]%>’;

Tags:

This entry was posted on Monday, July 20th, 2009 at 2:51 am and is filed under .Net Emperor. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment