Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Adding label to asp.net page

 
Thread Tools Search this Thread
Old 04-13-2009, 03:42 PM   #1
Default Adding label to asp.net page


I added this label inside a <div>:

<asp:label id="lblNegRate" runat="server" style="color:Red"
text="* Denotes a negotiated rate." />

and when I run my app, I get this error:

"sys.argumentexception: value must not be null for controls and
behaviors"

I don't understand what the error is trying to tell me. Anyone have
any ideas?


Doogie
  Reply With Quote
Old 04-13-2009, 04:43 PM   #2
Doogie
 
Posts: n/a
Default Re: Adding label to asp.net page
On Apr 13, 9:42*am, Doogie <dnlwh...@dtgnet.com> wrote:
> I added this label inside a <div>:
>
> * * <asp:label id="lblNegRate" runat="server" style="color:Red"
> text="* Denotes a negotiated rate." />
>
> and when I run my app, I get this error:
>
> "sys.argumentexception: value must not be null for controls and
> behaviors"
>
> I don't understand what the error is trying to tell me. *Anyone have
> any ideas?


Actually it turns out that this line is the problem:
<script type="text/javascript" language="javascript" src="../Includes/
wz_tooltip.js" visible="true" />

I had modified it from this:
<script type="text/javascript" language="javascript" src="../Includes/
wz_tooltip.js" visible="true" ></script>
Essentially remove the </script> and replacing it with a /> value.
Not sure why that error occurs because that should be valid (and I
have an identical line - different js page reference - in a line above
it and I did the same thing and it works). Must be something wrong
with wz_tootip.js perhaps? Why would the error only occur when I
change the way I end the script tag then? Very odd.


Doogie
  Reply With Quote
Old 04-13-2009, 05:12 PM   #3
Doogie
 
Posts: n/a
Default Re: Adding label to asp.net page
On Apr 13, 11:08*am, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
> "Doogie" <dnlwh...@dtgnet.com> wrote in message
>
> news:f17b82a9-abae-49c6-9fe7-...
>
>
>
>
>
> >> I don't understand what the error is trying to tell me. Anyone have
> >> any ideas?

>
> > Actually it turns out that this line is the problem:
> > <script type="text/javascript" language="javascript" src="../Includes/
> > wz_tooltip.js" visible="true" />

>
> > I had modified it from this:
> > <script type="text/javascript" language="javascript" src="../Includes/
> > wz_tooltip.js" visible="true" ></script>
> > Essentially remove the </script> and replacing it with a /> value.
> > Not sure why that error occurs because that should be valid (and I
> > have an identical line - different js page reference - in a line above
> > it and I did the same thing and it works). *Must be something wrong
> > with wz_tootip.js perhaps? *Why would the error only occur when I
> > change the way I end the script tag then? *Very odd.

>
> It's a known issue - basically, try it one way and if it doesn't work try it
> the other way...
>
> Also, you need to remove language="javascript" from all your script tags, as
> that property has been deprecated for over 12 years...
>
> --
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net- Hide quoted text -
>
> - Show quoted text -


Will do. I actually didn't put it in there, it was there and I was
trying to clean up other stuff I saw and didn't know that it was
deprecated. Thanks.


Doogie
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
viewstate MAC failed in asp.net 2.0 while postback the page azraffarveen Software 0 05-12-2009 03:24 PM
.NET 2.0 Web Apps / .NET 3.5 ASP.NET Apps - Differences/Similariti london1919 MCTS 1 12-08-2008 03:16 PM
ASP.NET: Asign Users in Roles(Array.IndexOf(Of String) method) msandlana Software 0 04-25-2008 06:37 AM
Looking for 2-up CD label software or template M.L. DVD Video 14 05-31-2007 01:49 AM
ASP.NET 2.0 application does not run in WIN2k3 johnfraj Software 0 04-19-2007 08:27 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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