*Experts* Nerseus Posted January 24, 2003 *Experts* Posted January 24, 2003 /me whistles quietly to see if anyone is using J#... -Me Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
mr_zack Posted February 12, 2003 Posted February 12, 2003 No your are not alone, they watch! Hello, I just started working with J#, have to admit that it is not as easy to migrate code to it. I have some code, I am converting from C# The problem I have is that I can't resolve the linkStyles control like I did in vb or c#, I had to use the controls array see Line 1 Even though the control has an ID/Name I still can't refrence it, What is the problem? I got it to work but it is not so cleanly done. Thanks Zack <HEAD> <title>Using CSS in VS.NET</title> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> <link id="linkStyles" name="linkStyles" href="Styles/Styles.css" type="text/css" rel="stylesheet" runat="server" /> </HEAD> Line 1 System.Web.UI.Control ctrl = this.get_Controls().get_Item(1); System.Web.UI.HtmlControls.HtmlGenericControl htmlLink = (HtmlGenericControl) ctrl; switch( rblType.get_SelectedIndex()) { case 1: //Fancy Styles { htmlLink.get_Attributes().set_Item ("href","Styles/Customized.css"); //linkStyles.Attributes.Item("href") = "Styles/Customized.css"; htmlLink.get_Attributes().set_Item("visable","true"); //linkStyles.Visible = True; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.