473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Use aspx.vb Code to Javascript Code

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
Nov 19 '05 #1
4 1750
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" <fo***@nospam.DotNetMonster.com>
wrote in message news:bb******************************@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

Nov 19 '05 #2
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" <fo***@nospam.DotNetMonster.com> wrote in message news:bb******************************@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

Nov 19 '05 #3
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
Nov 19 '05 #4
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
Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nic | last post by:
Hi, I need to get the equivilent of Response.Redirect (~/mypage.aspx) for a dynamic javascript function. Essentially I am writing the javascript on the non-code behind page and need to inject the...
3
by: Stevie_mac | last post by:
It might be me but... I dont seem to get a Page_Load event when a opening an ASPX in an iFrame. I do geta Page_Load event when an item on the ASPX (inside the iFrame) is clicked but then...
3
by: Evan | last post by:
I have a web page with 2 frames. The left frame is running menu.aspx and the right frame is running images.aspx. When a selection is made in menu.aspx I call a method in images.aspx and pass a...
6
by: John Rivers | last post by:
hi, here is how to do it and restore sanity to aspx html rendering: (please only reply with sensible architectural discussion - juan) put this at the end of an aspx file (or use an include at...
0
by: Keith | last post by:
I have a web form that contains a repeater control that is designed to ask like a check book register. Clicking on a certain transaction takes the user to a different .aspx page where it can be...
3
by: VMI | last post by:
I know this isn't the best group to post aspnet question, but the MS asp.net NG hasn't been very helpful lately. I've been trying to add a messagebox following the examples I've seen on the web,...
10
by: Shadow Lynx | last post by:
That subject packs a whallop, so let me explain in better detail what's happening and how it relates to ASPX pages... In a nutshell, if the first <script /on a page is of type "text/vbscript",...
2
by: Ravi | last post by:
Hi, I am trying to call an aspx page from an htm file. I have written something like this in my htm file <script src="Test.aspx"></script? The Test.aspx page should call a javascript function...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
3
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, This is an issue that happens to me and everybody else I know and I've never found a way around it. In Visual Studio (currently using 2003 but the same has happened for me in 2005 and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.