Professional Web Applications Themes

microsoft.public.dotnet.framework.aspnet - ASP.NET General

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

Sponsored Links
  1. #1

    Default microsoft.public.dotnet.framework.aspnet

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

    Thanks in advance
    Nitc



    Sponsored Links
    nitc3 Guest

  2. #2

    Default Re: microsoft.public.dotnet.framework.aspnet

    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  3. #3

    Default Re: microsoft.public.dotnet.framework.aspnet

    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" <nattydao2com.com> wrote in message news:umyyQi5ODHA.2244TK2MSFTNGP11.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 [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    nitc3 Guest

  4. #4

    Default Re: microsoft.public.dotnet.framework.aspnet

    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 [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  5. #5

    Default Re: microsoft.public.dotnet.framework.aspnet

    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" <nattydao2com.com> wrote in message news:#vFBO26ODHA.3768tk2msftngp13.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 [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    nitc3 Guest

Similar Threads

  1. Replies: 0
    Last Post: March 15th, 07:54 PM
  2. microsoft.public.inetServer.asp.general ?
    By McKirahan in forum ASP Database
    Replies: 1
    Last Post: February 25th, 12:37 PM
  3. dotnet.framework.webservices ???
    By richlm in forum ASP.NET Web Services
    Replies: 0
    Last Post: October 5th, 08:38 PM
  4. Problems with Microsoft.Net Framework SDK
    By Mogomotsi Masege in forum ASP
    Replies: 2
    Last Post: September 26th, 02:58 PM
  5. Can't install Microsoft Framework
    By Dinesh in forum ASP Components
    Replies: 0
    Last Post: September 6th, 03:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139