|
-
Jul 21st, 2003, 09:20 PM
#1
adding a control to a tableCell deletes all the text?
Umm I;m creating a table at runtime. I'm creating TableCells, it's been working fine till now. I have some stuff added to the TableCell.Text and it worked fine, but now that I'm also adding a linkButton control to the cell, all the text disappears and only the link button shows up.
What's wrong with what I'm doing? how can I preserve the text in the tableCell when I add the linkButton control to it?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 26th, 2003, 11:16 PM
#2
anyone knows what I'm talking about?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 27th, 2003, 01:39 AM
#3
PowerPoster
Without seeing your code, its hard to tell where your going wrong. I just whipped this up and it works fine:
Code:
HtmlTable t = new HtmlTable();
HtmlTableRow r = new HtmlTableRow();
HtmlTableCell c = new HtmlTableCell();
LiteralControl l = new LiteralControl("Name: ");
c.Controls.Add(l);
LinkButton lnk = new LinkButton();
lnk.Text = "Click Me";
c.Controls.Add(lnk);
r.Cells.Add(c);
t.Rows.Add(r);
FindControl("Form1").Controls.Add(t);
-
Jul 29th, 2003, 12:47 AM
#4
umm well yeah I didnt add the text with a literal control I just set the .TEXT property, anything wrong with that?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 29th, 2003, 10:46 AM
#5
PowerPoster
Originally posted by MrPolite
umm well yeah I didnt add the text with a literal control I just set the .TEXT property, anything wrong with that?
Yes, it isn't working for you....
-
Jul 29th, 2003, 11:10 AM
#6
PowerPoster
Originally posted by MrPolite
umm well yeah I didnt add the text with a literal control I just set the .TEXT property, anything wrong with that?
I agree with hellswraith...
-
Jul 30th, 2003, 12:55 PM
#7
well thanks hellswraith I didn't know that it wasn't working... 
what's the purpose of the Text property of a table cell then?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 30th, 2003, 01:30 PM
#8
PowerPoster
To put text in it when you are not adding controls to it.
-
Jul 30th, 2003, 01:32 PM
#9
PowerPoster
MSDN Library says:
Remarks
Use the Text property to specify or determine the text contents of the cell. This property is commonly used to programmatically update the contents of a cell.
Note Setting the Text property will clear any other controls contained in the TableCell.
CAUTION This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input. For more information, see Validation Server Controls.
-
Jul 30th, 2003, 02:33 PM
#10
thanks alot, makes sense now, hehe
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
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
|