473,385 Members | 1,154 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,385 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 2202
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.