K
Ken Fine
I'm using ASP.NET and VS.NET 2008 beta. (This is not specifically a VS.NET
beta question -- it IS an ASP.NET Q -- so please keep reading.)
Scott M. made a very nice control to dynamically generate rounded corners:
http://datawebcontrols.com/demos/RoundedCorners.aspx
This control functions with the design view in VS.NET 2005 but appears to
break in the design view in VS.NET 2008. Explanation: Scott's control can
"wrap" other content, and in VS.NET the content inside the rounded corner
control is hidden. Nontheless, the control works fine when rendered.
I am wondering what clever ways I might be able to use to retain my design
view in VS.NET 2008 while still calling Scott's code at runtime. I am sure
there is a way. I list some options shortly.
In ASPX it is called like this:
<cc1:RoundedCorners ID="Roundedcorners3" ShowTitle="False" Title="Test"
runat="server BackColor="#FFFFFF" BorderColor="Gold" BorderStyle="Solid"
BorderWidth="3px"
Font-Names="Verdana"
ImageDirectory="~/RoundedCornersTester/Images/" Font-Size="11px"
Width="100%" Padding="2px"
HorizontalAlign="Right" TitleStyle-BackColor="#C0C0FF"
CornerHeight="15px"
BackgroundBackColor="#3A265A" align="Right" >
[ whatever content you want inside the rounded corner control goes here ]
</cc1:RoundedCorners>
So I am familiar with the notion of dynamically calling controls from
codebehind, but I don't think that works here since you are "wrapping" other
controls and content.
Some options I see include:
1) Somehow specifying comment characters in the declarative ASPX, and
programmatically removing those comment characters at runtime. Right now I'm
manually inserting comment characters in the markup and removing them by
hand when I deploy.
2) Somehow injecting the entire block of declarative ASPX programmatically
at runtime, but prior to the time the aspx markup is parsed and rendered. I
don't even know if this is possible: I'm interested if it is. We would need
to programmatically inject the opening tag and the closing tag. Based on
other examples I've read involving a mysterious something called a
"literal", I think this may be possible.
3) Something else cleaner that I'm not quite fathoming.
Any help out there in net land?
Thank you,
-KF
beta question -- it IS an ASP.NET Q -- so please keep reading.)
Scott M. made a very nice control to dynamically generate rounded corners:
http://datawebcontrols.com/demos/RoundedCorners.aspx
This control functions with the design view in VS.NET 2005 but appears to
break in the design view in VS.NET 2008. Explanation: Scott's control can
"wrap" other content, and in VS.NET the content inside the rounded corner
control is hidden. Nontheless, the control works fine when rendered.
I am wondering what clever ways I might be able to use to retain my design
view in VS.NET 2008 while still calling Scott's code at runtime. I am sure
there is a way. I list some options shortly.
In ASPX it is called like this:
<cc1:RoundedCorners ID="Roundedcorners3" ShowTitle="False" Title="Test"
runat="server BackColor="#FFFFFF" BorderColor="Gold" BorderStyle="Solid"
BorderWidth="3px"
Font-Names="Verdana"
ImageDirectory="~/RoundedCornersTester/Images/" Font-Size="11px"
Width="100%" Padding="2px"
HorizontalAlign="Right" TitleStyle-BackColor="#C0C0FF"
CornerHeight="15px"
BackgroundBackColor="#3A265A" align="Right" >
[ whatever content you want inside the rounded corner control goes here ]
</cc1:RoundedCorners>
So I am familiar with the notion of dynamically calling controls from
codebehind, but I don't think that works here since you are "wrapping" other
controls and content.
Some options I see include:
1) Somehow specifying comment characters in the declarative ASPX, and
programmatically removing those comment characters at runtime. Right now I'm
manually inserting comment characters in the markup and removing them by
hand when I deploy.
2) Somehow injecting the entire block of declarative ASPX programmatically
at runtime, but prior to the time the aspx markup is parsed and rendered. I
don't even know if this is possible: I'm interested if it is. We would need
to programmatically inject the opening tag and the closing tag. Based on
other examples I've read involving a mysterious something called a
"literal", I think this may be possible.
3) Something else cleaner that I'm not quite fathoming.
Any help out there in net land?
Thank you,
-KF