473,808 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

microsoft.publi c.dotnet.framew ork.aspnet

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

Thanks in advance
Nitc

Nov 17 '05 #1
4 2228
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="javas cript" 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.At tributes["href"] = "Local/Styles/Style.css";

Thanks
Nitc

"Natty Gur" <na***@dao2com. com> wrote in message news:um******** ******@TK2MSFTN GP11.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
RegisterClientS ideScriptBlock( "BlockID","<scr ipt language="javas cript"
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 WebUIvalidation s.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=Env ironment.Versio n.ToString();

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

//Register the client script
RegisterClientS criptBlock("Blo ckID","<script language=\"java script\" src=\"/aspnet_client/system_web/"+sEnvVersi on+"/WebUIValidation .js\"></script>");

Cheers
nitc3

"Natty Gur" <na***@dao2com. com> wrote in message news:#v******** ******@tk2msftn gp13.phx.gbl...
RegisterClientS ideScriptBlock( "BlockID","<scr ipt language="javas cript"
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
1087
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 from www.ugroups.com is intended for those who might be interested in free web based access to the newsgroups. Please add to your kill file to avoid future inconvenience. Posted Via Usenet.com Premium Usenet Newsgroup Services...
354
15938
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 hooked up to interfaces. The Gtk is more than enough gui.
0
2288
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 groups knows a solution. I'm using code (roughly like): using System; using System.Management; public class Foo {
0
853
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
1199
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 DataGrid appeared, the other three (non-Bool) columns were drawn properly, but the checkboxes were drawn in an "intermediate" state, that is, greyed-out. "Allow nulls" in the DataColumn? Yes. No. Allow then in the DataGrid? Yes. No. True...
0
995
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 using the copy command to print to the port? Can i use something other than the copy command? o.AddPrinterConnection("LPT1", "\\MachineName\Test")
3
286
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 then all the other users connections seem to close. This is most obviously seen when I'm writing a rather large chunk of data with connection A. Then connection B comes in to the application and grabs a small piece of data. Of course, during...
9
1729
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 to open pretty much anything I want using shell execute etc. I tried importing the old code into VB dotNet and it executes fine but just doesn't actually open the file. No errors returned at all (?).
0
9721
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10374
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10114
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3011
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.