473,545 Members | 2,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Register client script question

Hi,
By calling Page.RegisterCl ientScriptBlock , the JavaScript will be
generated right after VIEWSTATE hidden field. Is there a way I can register
my script to end of page instead beginning?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
Nov 18 '05 #1
3 7740
Not sure why you feel the need to, but RegisterStartup Script puts the script
just before the </form> tag.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Hardy Wang" <ha*******@hotm ail.com> wrote in message
news:uh******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
By calling Page.RegisterCl ientScriptBlock , the JavaScript will be
generated right after VIEWSTATE hidden field. Is there a way I can register my script to end of page instead beginning?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy

Nov 18 '05 #2
My script is registered just after VIEWSTATE hidden value.

The reason I am doing so is ValidationSumma ry won't popup alert box if one
of the validator is server side (sadly, I have to go to server side). So I
am thinking of a walk-around. My idea is to build a function to detect each
validator's status, grab the error message of thoese invalid, I will
concatenate messages to form a JavaScript, then I register this script to
client.
But just as what I said above, this piece of code appears in top of HTML
code, probably because I am doing this in a ASCX control
(Page.RegisterC lientScriptBloc k). Until user click OK button of dialog, the
whole page will not show up, so I am thinking of moving this thing to
bottom, let page finished loading, then call JavaScript.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uM******** ******@TK2MSFTN GP09.phx.gbl...
Not sure why you feel the need to, but RegisterStartup Script puts the
script
just before the </form> tag.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Hardy Wang" <ha*******@hotm ail.com> wrote in message
news:uh******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
By calling Page.RegisterCl ientScriptBlock , the JavaScript will be
generated right after VIEWSTATE hidden field. Is there a way I can

register
my script to end of page instead beginning?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy


Nov 18 '05 #3
Good heavens!

I think you might have a much easier time if you did your own validation.
That's what we do here. It's not particularly hard to do, if you're any good
at JavaScript!

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Hardy Wang" <ha*******@hotm ail.com> wrote in message
news:uA******** ******@TK2MSFTN GP11.phx.gbl...
My script is registered just after VIEWSTATE hidden value.

The reason I am doing so is ValidationSumma ry won't popup alert box if one
of the validator is server side (sadly, I have to go to server side). So I
am thinking of a walk-around. My idea is to build a function to detect each validator's status, grab the error message of thoese invalid, I will
concatenate messages to form a JavaScript, then I register this script to
client.
But just as what I said above, this piece of code appears in top of HTML
code, probably because I am doing this in a ASCX control
(Page.RegisterC lientScriptBloc k). Until user click OK button of dialog, the whole page will not show up, so I am thinking of moving this thing to
bottom, let page finished loading, then call JavaScript.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:uM******** ******@TK2MSFTN GP09.phx.gbl...
Not sure why you feel the need to, but RegisterStartup Script puts the
script
just before the </form> tag.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Hardy Wang" <ha*******@hotm ail.com> wrote in message
news:uh******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
By calling Page.RegisterCl ientScriptBlock , the JavaScript will be
generated right after VIEWSTATE hidden field. Is there a way I can

register
my script to end of page instead beginning?

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy



Nov 18 '05 #4

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

Similar topics

6
1465
by: use dmgass at hotmail dot com | last post by:
I'm writing a module and when it is imported by a script I want some code automatically executed when the importing script is finished executing. I'd like it to execute before interactive mode is entered when executing the importing script from the command line. I don't want to have to impose that the importing script must call a function at...
1
14129
by: G Kannan | last post by:
Hey all! I have written a perl script to retrieve information from a HTML Form and insert the data into an Oracle database table. I am gettting the the following error message: "Use of uninitialized value in concatenation (.) at register.pl line 38, <STDIN> line 10." The PERL code is as follows:
2
2383
by: Kristoffer Arfvidson | last post by:
Ok, so a new question... Im building my page as dynamic as I can... meaning that I have basicly one aspx page that controls everything... so, I solved this by sending different variables to the page depending on where i want to go, eg. www.myserver.com/gotopage.aspx?page=mainpage ok, so, on this gotopage.aspx I have used a lot of...
1
1749
by: Darren Clark | last post by:
How does everyone register and access input objects on the client side? well... i suppose i am after some alternate ways... i use the following code to put the neccessary client javascript code so that i can then use them later... private void RegisterClientObjects() { System.Text.StringBuilder sBuild = new System.Text.StringBuilder();
0
1038
by: Stuart Shay | last post by:
Hello All: I am having problem with the getting the Follow JS to run on Startup, the Script gets the client UTC Offset Time it seems the script seems to post back private string GetClientUTCOffsetScript() { string scriptGetClientUTCOffset = "<scriptlanguage=javascript>" + "var now = new Date();" +
3
2276
by: Goh | last post by:
Hi, May I know how to register a java script inside the <head> tag not the body? I found only got method that able register at the body like RegisterStartupScript and RegisterClientScriptBlock. I would like to register this script inside user control. and this script must be run when the page is load. Got any method that able to call to...
1
2128
by: lourivas | last post by:
Hi, I create a class with a property called MyProperty that needs to register a client script if the value is set to true. When i change the property value to true i always receive a message "Property value is not valid/Object reference not set to an instance of an object". I'm using VS 2005. What i'm missing? see:
1
2631
by: Gen | last post by:
Hello there, I am a leader of a team, developing business application based on the ASP.NET platform. Now we need to add cash register support to the application and it seems to be a bit of a problem. In general communication with the cash register consists of two steps: 1 - Creation of a text file, describing the items, quantities and...
53
8332
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script language="javascript" type="text/javascript">
0
7499
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7943
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7456
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6022
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5359
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.