C# TableCell Dynamic CSS Style and Event assignment PLEASE HELP
1 réponse
jay.mistry
Hi,
I'm trying to make a page that has a dynamic menu on the left. I
generate this menu by getting the menu items from a database table
that holds title, alt tag, link, sort order, etc... for a given menu
ID. I had done a static version up until now and the number of pages
have gotten huge and this is why I decided to put menu info in the DB.
Right now I have a menus in a HTML Table with the following property
in every <TD> tag of every <TR> tag of the menu table:
How can I do this in C#? I get the table entries and have something
along the lines of:
Table table = new Table();
while(datareader.Read()) {
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell....//set all properties
Hyperlink link = new Hyperlink();
link....//set all attributes of the link with data from DB
cell.add(link);
row.add(cell);
table.add(row);
}
How do I specify the event listed in the <TD> tag that is listed above
in the TableCell? i've fooled around a bit, but not having good books
and unable to find examples have left me to a last resort of posting
the problem...Any help would be really appreciated.
I'm trying to make a page that has a dynamic menu on the left. I generate this menu by getting the menu items from a database table that holds title, alt tag, link, sort order, etc... for a given menu ID. I had done a static version up until now and the number of pages have gotten huge and this is why I decided to put menu info in the DB. Right now I have a menus in a HTML Table with the following property in every <TD> tag of every <TR> tag of the menu table:
How can I do this in C#? I get the table entries and have something along the lines of:
Table table = new Table(); while(datareader.Read()) { TableRow row = new TableRow(); TableCell cell = new TableCell(); cell....//set all properties Hyperlink link = new Hyperlink(); link....//set all attributes of the link with data from DB cell.add(link); row.add(cell); table.add(row); }
How do I specify the event listed in the <TD> tag that is listed above in the TableCell? i've fooled around a bit, but not having good books and unable to find examples have left me to a last resort of posting the problem...Any help would be really appreciated.
Thank you :)
Jay.
Hi all,
I've figured this out. Its via the Attributes property of any Web
Component. I just did something like
jay.mistry@gmail.com (Jay) wrote in message news:<3490f341.0412011054.1ff5e5f2@posting.google.com>...
Hi,
I'm trying to make a page that has a dynamic menu on the left. I
generate this menu by getting the menu items from a database table
that holds title, alt tag, link, sort order, etc... for a given menu
ID. I had done a static version up until now and the number of pages
have gotten huge and this is why I decided to put menu info in the DB.
Right now I have a menus in a HTML Table with the following property
in every <TD> tag of every <TR> tag of the menu table:
How can I do this in C#? I get the table entries and have something
along the lines of:
Table table = new Table();
while(datareader.Read()) {
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell....//set all properties
Hyperlink link = new Hyperlink();
link....//set all attributes of the link with data from DB
cell.add(link);
row.add(cell);
table.add(row);
}
How do I specify the event listed in the <TD> tag that is listed above
in the TableCell? i've fooled around a bit, but not having good books
and unable to find examples have left me to a last resort of posting
the problem...Any help would be really appreciated.
I'm trying to make a page that has a dynamic menu on the left. I generate this menu by getting the menu items from a database table that holds title, alt tag, link, sort order, etc... for a given menu ID. I had done a static version up until now and the number of pages have gotten huge and this is why I decided to put menu info in the DB. Right now I have a menus in a HTML Table with the following property in every <TD> tag of every <TR> tag of the menu table:
How can I do this in C#? I get the table entries and have something along the lines of:
Table table = new Table(); while(datareader.Read()) { TableRow row = new TableRow(); TableCell cell = new TableCell(); cell....//set all properties Hyperlink link = new Hyperlink(); link....//set all attributes of the link with data from DB cell.add(link); row.add(cell); table.add(row); }
How do I specify the event listed in the <TD> tag that is listed above in the TableCell? i've fooled around a bit, but not having good books and unable to find examples have left me to a last resort of posting the problem...Any help would be really appreciated.