473,396 Members | 2,018 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,396 software developers and data experts.

microsoft.public.dotnet.framework.aspnet

How to access script tag attributes in asp.net from code behind?

Thanks in advance
Nitc

Nov 17 '05 #1
4 2203
If i get you right, By accessing properties.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Let me rephrase my question.
If you want to add <script language="javascript" src="/aspnet/scripts.js"></script> tag from the code behind page then how would you do it?

For eg. If you want to add link tag you can use this.LinkTag.Attributes["href"] = "Local/Styles/Style.css";

Thanks
Nitc

"Natty Gur" <na***@dao2com.com> wrote in message news:um**************@TK2MSFTNGP11.phx.gbl...
If i get you right, By accessing properties.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 17 '05 #3
RegisterClientSideScriptBlock("BlockID","<script language="javascript"
src="/aspnet/scripts.js"></script>");

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4
Natty,
Had to make slight modifications and it worked!
The actual problem was if you do server.transfer to a page which is having an asp.net validations control the WebUIvalidations.js is not loaded some times and it displays an error stating to reinstall the js file by running aspnet_regiis -c command.
The possible solution for this problem is add this code from where you are performing server.transfer.

//ASP.NET bug fix which causes script file not to bind with page
string sEnvVersion=Environment.Version.ToString();

//From 1.0.3705.288 To 1_0_3705_288
sEnvVersion = Regex.Replace(sEnvVersion,"[.]","_");

//Register the client script
RegisterClientScriptBlock("BlockID","<script language=\"javascript\" src=\"/aspnet_client/system_web/"+sEnvVersion+"/WebUIValidation.js\"></script>");

Cheers
nitc3

"Natty Gur" <na***@dao2com.com> wrote in message news:#v**************@tk2msftngp13.phx.gbl...
RegisterClientSideScriptBlock("BlockID","<script language="javascript"
src="/aspnet/scripts.js"></script>");

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 17 '05 #5

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

Similar topics

0
by: Daryl | last post by:
This is a monthly reminder that via the web you can easily access microsoft.public.dotnet.general without a newsreader at http://www.ugroups.com/Computers/viewforum.php?f=11 This message...
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
0
by: Helge Jensen | last post by:
Having posted in microsoft.public.dotnet.framework.sdk and microsoft.public.dotnet.framework.wmi without receiving any response, I posthere on the off-chance that someone who isn't following those...
0
by: William Stacey | last post by:
This has not worked for a while. Seems to work now for those interested. -- William Stacey, DNS MVP
0
by: Frnak McKenney | last post by:
I just spent four hours trying to find out why the checkboxes representing a bound DataGrid DataGridBoolColumn weren't acting properly. When the Form containing the DataGrid was initialized the...
0
by: SpamProof | last post by:
I want to print a prn file to a network printer via vb.net. What's the best way to do this? Can I use 'net use' via vb.net? How? Also, will that work with somehting like the following when...
3
by: Rig76 | last post by:
I'm having a very strange issue with an application I'm building. The applicaiton has multiple users, each with their own connection to the database. However, when one of these connections closes...
9
by: Mark | last post by:
Hello I am trying to set up an open file routine that will open whatever files name is passed with its correct associated application. I have done this (quite easilly) before in VBA and am able...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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,...
0
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...

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.