Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

/me whistles quietly to see if anyone is using J#...

 

-Me

"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
  • 3 weeks later...
Posted

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;

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...