CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/14/2007 2:47:38 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 9 Views: 149 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
10 Items, 1 Pages 1 |< << Go >> >|
roto23
Asp.Net User
Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 2:47:38 PM

0/0

When I programatically set the SkinID, even though the code flows without error, the skinID is ignored and the table is render in plain white. I have to set the SkinID on the page_PerInit event not the onLoad event.

I can get skinId to work if I hard code the <asp:TableRow> tags in the aspx page and reference the skinID there, but this does not help because I do not know how many rows there will be, and the number of rows vary depending on who is logged in.

 Here is the code I use to set the skinID programatically...

TableRow tbrForumIndex = new TableRow();

tbrForumIndex.SkinID = "TableEvenRowView";

 (even though the skinID gets sets, when the page is rendered, the row / table is all white.

Any suggestion on how to get the skin to show itself.

omerkamal
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 3:51:22 PM

0/0

after the Table rows are created (you have to discover that at which stage your Table is bound to its Data) try this:

 foreach (TableRow row in myTable.Rows)
            row.SkinID = "TableEvenRowView";

Where myTable is the ID of your ASP Table 

But if you are Binding Data after the Page was created (i.g on Button Click event) then you must run this could after the data is loaded in the Table.


 Click to visit
We help with .NET Development. Visit us and share your part!
roto23
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 4:25:26 PM

0/0

I don't see why setting skinId in your loop would be any different then setting it the way I did.  Your just looping through the table after it is complete.

This link was helpful but did not solve my problem

http://forums.asp.net/p/962663/1197126.aspx#1197126

I am creating the TableRows dynamically and using a Page.StyleSheetName instead of a Page.Theme  

I think there is a bug because my code works with Page.Theme and does not work with Page.StyleSheetName.  This link believes this to be the case as well....

http://forums.asp.net/p/960623/1190920.aspx#1190920

 

 

still no solution :-(

 

 

omerkamal
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 6:41:34 PM

0/0

The thing is that you are setting Skin for each Table Row instead of  to the Table. This is why each created Table Row must have it to which you want to set.

more over, you have the choice of making it even and odd rows skin.

Otherwise, create skin for the table and bind it to the table.

still I did not try it with The ASP:Table but it used it in the DataList and it worked nice for me.


 Click to visit
We help with .NET Development. Visit us and share your part!
roto23
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 8:54:26 PM

0/0

Was the control you used dynamically created or hard coded in the .aspx file? 

Did you use Page.theme or page.StyleSheetName?

The bug occurs when you use Page.StyleSheetName with Dynamic controls.

 

Switching form Page.StyleSheetName to Page.Theme solved the problem, but I lose the flexibility of Page.StyleSheetName, which is good enough.

roto23
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 8:55:15 PM

0/0

Oh, I forgot to thank you for tying, I apprieciate it.

omerkamal
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 9:36:55 PM

0/0

Page.StyleSheetName is only a Css file where as Theme include all Css files, skin files and son on. 

I wrote a Fast code help some days ago. I hope it answers your question.

If you still have some problems you can ask any time (you can also use dotnet-friends.com forum).

You can also send me your all code and I will try to fix is according to you want.


 Click to visit
We help with .NET Development. Visit us and share your part!
roto23
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 10:19:12 PM

0/0

I have it working, by changing Page.StyleSheetName to Page.Theme in the PreInit event

Also, In many of my pages I use Page.StyleSheetName to reference  skin files and css files, so you may be mistaken that Page.StyleSheetName is limited to only css files. Page.StyleSheetName uses css files for your html controls and skin files for your asp.net server controls.

Again, thaks for your help.

omerkamal
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 11:26:35 PM

0/0

Ok this discussion is turning in to a kind of intresting talk lol

you know what? there is actualy no Property called Page.StyleSheetName rather it is only  Page.StyleSheetTheme

Please see the msdn reference for the Page members: http://msdn2.microsoft.com/en-us/library/system.web.ui.page_members(vs.80).aspx 

So now, If we use Page.Theme or  Page.StyleSheetTheme It will result the same. 

and yeah, I agree at the point that StyleSheet can be any sheet which configures style of a Document.

But generaly speaking, when a Web developer talkes about a style sheet thingy it perticularly means a CSS file. The other style sheets are ASP .NET inventions which actually endorce the usage of XML family (May be I am too old to accept new broader names lol).


 Click to visit
We help with .NET Development. Visit us and share your part!
roto23
Asp.Net User
Re: Trouble Applying SkinId to an <asp:TableRow> tag7/14/2007 11:38:51 PM

0/0

I incorrectly typed Page.StyleSheetName instead of Page.StyleSheetTheme. Sorry for the confusion.  Oddly Page.StyleSheetTheme does not work with my dynamic controls where Page.Theme does.  Its probably something I am doing, but its good enough for now.  I need to get into the real coding of this project and not spend so much time on the presentation layer....which gets changed every 2 years anyhow.

 

Thanks for the help.

10 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
TheMSsForum.com >> Asp >> SmtpFailedRecipientException/s - how it ... Now, when these forms are executed they seem to have trouble finding the web ..... .skin file ...
TheMSsForum.com >> Asp >> Using PagedDataSource with a Repeater ... Problem applying theme to page! ASP.NET 2.0 I have problem with the markup and ... .skin file ...
AJAX Control Toolkit - Issue Tracker hi all, i have this trouble with autocompleteextender. if i type a single word in ..... First, when applying the DragPanelExtender the bein. ...
October 2008 - Microsoft ASP.Net Tips 2) Applying a background color on the iframe (like a dark and transparent color) ...... I use html button tag instead of asp:button. ...
TheMSsForum.com >> Asp >> SmtpFailedRecipientException/s - how it ... Now, when these forms are executed they seem to have trouble finding the web ..... .skin file ...
TheMSsForum.com >> Asp >> Using PagedDataSource with a Repeater ... Problem applying theme to page! ASP.NET 2.0 I have problem with the markup and ... .skin file ...
AJAX Control Toolkit - Issue Tracker hi all, i have this trouble with autocompleteextender. if i type a single word in ..... First, when applying the DragPanelExtender the bein. ...
October 2008 - Microsoft ASP.Net Tips 2) Applying a background color on the iframe (like a dark and transparent color) ...... I use html button tag instead of asp:button. ...
TheMSsForum.com >> Asp >> SmtpFailedRecipientException/s - how it ... Now, when these forms are executed they seem to have trouble finding the web ..... .skin file ...
TheMSsForum.com >> Asp >> Using PagedDataSource with a Repeater ... Problem applying theme to page! ASP.NET 2.0 I have problem with the markup and ... .skin file ...




Search This Site:










adding a line-break in a treeview node?

web.sitemap editor

menu control disappears after publish

treeview postback + populatenode

no "select master page" on new item dialog

forms authentication and themes

master page problem

theme nightmare

master pages and css layout templates

loginname control won't display in a contents page

dynamic globresource request

menu control not reacting ??

how to wrk on the property of treeview?

treeview parent checkbox selection when child nodes are selected and vise a versa

sitemap navigation visibility

theme stylesheets

svg and masterpage incompatibility

prevent content page from executing

meta tags with asp.net?

menu designing in .net 2003

master page and textbox

.net 2.0 menu questions

masterpages or dreamweaver templates - which works best?

displaying results in content place holders

changing theme structure

asp menu, transparent back color

newbie - how to convert existing html page into a master page?

master page & javascript text editor

dynamically edit skin

how to design a theme

  Privacy | Contact Us
All Times Are GMT