Go Back  Xtreme .NET Talk > .NET > Syntax Specific > Visual J# .NET > Whistling in the dark...


Reply
 
Thread Tools Display Modes
  #1  
Old 01-23-2003, 06:11 PM
Nerseus's Avatar
Nerseus Nerseus is offline
Danner

Preferred language:
C#
 
Join Date: Oct 2002
Location: Arizona, USA
Posts: 2,547
Nerseus is on a distinguished road
Default Whistling in the dark...

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

-Me
Reply With Quote
  #2  
Old 02-12-2003, 02:15 PM
mr_zack mr_zack is offline
Newcomer

Preferred language:
C#, Vb.Net, J#
 
Join Date: Feb 2003
Location: Houston
Posts: 9
mr_zack is on a distinguished road
Cool 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;
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Death in the Dark Game project DivineLight Random Thoughts 2 07-07-2003 12:43 AM
DrawImage colors too dark. aewarnick Graphics and Multimedia 1 06-19-2003 12:10 PM

Advertisement:

Powered by liquidweb