|
-
Aug 18th, 2004, 12:36 PM
#1
Thread Starter
Frenzied Member
Object reference not set to an instance of an object.
When I run this code:
Code:
tblMain.InnerHtml = "<tr><td>I'm sorry, you did not fill out one or more required "+
"fields (Title and or description). Please <a href=\"javascript:history.go(-1)\">go back</a> "+
"try again.</td></tr>";
tblMain is a HtmlTable which is defined as protected at the top and is set to runat server Any ideas? It's in C# in case you'd not noticed 
Thanks
-
Aug 18th, 2004, 12:51 PM
#2
Re: Object reference not set to an instance of an object.
Originally posted by TomGibbons
tblMain is a HtmlTable which is defined as protected at the top ....
Thanks
But has it been instanciated? Defining is one thing, but it doesn't do much good until the instance is actualy created.
TG
-
Aug 18th, 2004, 12:57 PM
#3
I've never tried to do that as i'd say the majority of the time there will always be a better way of doing that sort of thing but anyway...... I just tried the same thing and get a different error message
Code:
'HtmlTable' does not support the InnerHtml property.
are you certain that this is the point where your code is failing?
-
Aug 20th, 2004, 03:33 AM
#4
Thread Starter
Frenzied Member
Originally posted by Fishcake
I've never tried to do that as i'd say the majority of the time there will always be a better way of doing that sort of thing but anyway...... I just tried the same thing and get a different error message
Code:
'HtmlTable' does not support the InnerHtml property.
are you certain that this is the point where your code is failing?
Ah, I wasn't getting that error message. Either way, I've gone about it a different way now and I'm getting the result I was after.
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|