Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Use aspx.vb Code to Javascript Code

Reply
Thread Tools

Use aspx.vb Code to Javascript Code

 
 
laxmilal Menaria via DotNetMonster.com
Guest
Posts: n/a
 
      05-12-2005
Hello Every one,


Can anybody please tell me how can I use values coming in my
somepage.aspx.vb into somepage.aspx's Java Script's Code?

What I need is that I am doing some page progress calculations in my
webform's .vb code but i have to display those values on

the .aspx of that same page.

is there is any way to do that ?

Please let me know if there is any alternative of doing that?


Thanks

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
 
Sambathraj
Guest
Posts: n/a
 
      05-12-2005
Hi,
This can be done using ASP way. Declare public property in your class which
exposes the required data. In Aspx page you can write like
var myData = <%= dblProgressVal %>;
Regards
Sambathraj
"laxmilal Menaria via DotNetMonster.com" <(E-Mail Removed)>
wrote in message news:bb340cc17bb94230bce0cef22f89f473@DotNetMonste r.com...
> Hello Every one,
>
>
> Can anybody please tell me how can I use values coming in my
> somepage.aspx.vb into somepage.aspx's Java Script's Code?
>
> What I need is that I am doing some page progress calculations in my
> webform's .vb code but i have to display those values on
>
> the .aspx of that same page.
>
> is there is any way to do that ?
>
> Please let me know if there is any alternative of doing that?
>
>
> Thanks
>
> --
> Message posted via http://www.dotnetmonster.com



 
Reply With Quote
 
 
 
 
Mona
Guest
Posts: n/a
 
      05-12-2005
Hi Laxmilal,

You can use RegisterClientScriptBlock to set values to the variables in your page's javascript code.

You can refer to following link for an example:

[Page.RegisterClientScriptBlock Method]
http://msdn.microsoft.com/library/de...BlockTopic.asp

You can use your own javascript instead and set the values of the variables there.

HTH

Mona[Grapecity]


"laxmilal Menaria via DotNetMonster.com" <(E-Mail Removed)> wrote in message news:bb340cc17bb94230bce0cef22f89f473@DotNetMonste r.com...
> Hello Every one,
>
>
> Can anybody please tell me how can I use values coming in my
> somepage.aspx.vb into somepage.aspx's Java Script's Code?
>
> What I need is that I am doing some page progress calculations in my
> webform's .vb code but i have to display those values on
>
> the .aspx of that same page.
>
> is there is any way to do that ?
>
> Please let me know if there is any alternative of doing that?
>
>
> Thanks
>
> --
> Message posted via http://www.dotnetmonster.com

 
Reply With Quote
 
laxmilal Menaria via DotNetMonster.com
Guest
Posts: n/a
 
      05-13-2005
Hi,

I Use your Sample But Problem that <% ... %> is not running in <script>
....</script> .

My Problem is :

I am getting Some Values on Page Render Event of aspx.vb page, but i have
displayed these values in javascript code of that same page, i have use
javascript code for xmlhttprequest, so every time render the page see value
on javascript

Thanks

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
laxmilal Menaria via DotNetMonster.com
Guest
Posts: n/a
 
      05-13-2005
Hi,

I see you link but not solve my problem.

My Problem is :

I am getting Some Values on Page Render Event of aspx.vb page, but i have
displayed these values in javascript code of that same page, i have use
javascript code for xmlhttprequest, so every time render the page see value
on javascript

Thanks

--
Message posted via http://www.dotnetmonster.com
 
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
use of Rhino to parse the Javascript code jackchang1@gmail.com Javascript 2 02-27-2007 02:21 AM
ASP.NET 2.0: To use or not to use code behind? pedestrian via DotNetMonster.com ASP .Net 5 09-28-2006 06:19 AM
use javascript from code behind...?? ismaili.amin@gmail.com Javascript 1 05-15-2005 08:19 PM
Fire Code behind code AND Javascript code associated to a Button Click Event =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?= ASP .Net 4 02-11-2004 07:31 AM
Can I use VS.net to debug code in JavaScript (.js) file? yma ASP .Net 1 11-26-2003 05:50 AM



Advertisments