Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Passing a text string from the server side to a client side function

Reply
Thread Tools

Passing a text string from the server side to a client side function

 
 
ken busse
Guest
Posts: n/a
 
      11-24-2003
I would like to be able to write a string value to a
variable on the server side and have it passed to the
client side for display in an alert box.
I've tried writing to a Server control label and reading
it in client side script but can't get it working.
I've tried passing a form variable that has the residing
label but that doesn't work.
Do you have any suggestions?

 
Reply With Quote
 
 
 
 
Raj
Guest
Posts: n/a
 
      11-24-2003
Well You can store the string message in a Hidden
Field . This hidden variable can be access using a
scripts .

HTH
Raj

>-----Original Message-----
>I would like to be able to write a string value to a
>variable on the server side and have it passed to the
>client side for display in an alert box.
>I've tried writing to a Server control label and reading
>it in client side script but can't get it working.
>I've tried passing a form variable that has the residing
>label but that doesn't work.
>Do you have any suggestions?
>
>.
>

 
Reply With Quote
 
 
 
 
MSFT
Guest
Posts: n/a
 
      11-24-2003
Hi Ken,

You may write some script like:

<Scrip>

alert("hello");

</Script>

to client side with the method registerclientscriptblock. For more
information on it, you may refer to:

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemWebUIPageClassRegisterClientScriptBlock Topic.asp

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a value from server side to client side kimberly.walker@consultant.com ASP .Net 4 07-13-2006 09:07 AM
passing a string from the server to client side javascript =?Utf-8?B?THluZXJz?= ASP .Net 10 04-03-2006 06:13 PM
Passing data from server side to client side? Mike Fellows ASP .Net 8 06-29-2004 03:28 PM
Re: Passing a string to a client side function Matt Howeson ASP .Net 2 01-30-2004 07:16 PM
Re: Passing a string to a client side function Kevin Spencer ASP .Net 1 01-29-2004 08:21 PM



Advertisments