|
-
Aug 15th, 2004, 09:46 AM
#1
Thread Starter
Member
How to change id values on a control while looping through.
I'm trying to add a hot news section with the TOP 3 results from the database into rounded edged tables. What I want to do is change the id value so it is not the same for each one. What I tried to do is add an incremented integer value at the end of "RoundedCorners1" with n being the incremented integer value and the tags looked like this:
<% Response.Write("id=RoundedCorners1" & n) %>
The problem is, I get an error saying that I cannot do this within a control. How would I go about changing the id value each time I loop through?
Here's the code
<skm:roundedcorners id="RoundedCorners1" runat="server" BackgroundBackColor="white"
BackColor="#FFE0C0" BorderColor="Black" BorderStyle="Solid"
BorderWidth="2px" Font-Names="Verdana"
ImageDirectory="/Images/" Font-Size="12px"
Width="150px" Padding="1px" CornerHeight="16px" TextHorizontalAlign="Center">
This is a simple example with text in the rounded corners box. It has a width
explicitly set to 150 pixels, and the images are anti-aliased.
</skm:roundedcorners>
It's not the size of the dog in the fight, it's the size of the fight in the dog.
-
Aug 16th, 2004, 01:47 PM
#2
I wonder how many charact
First, I question why you need to change the ID of a table?
Second, you can use the Table class within an overrided render method to create a table and assign an id...
-
Aug 16th, 2004, 02:04 PM
#3
Thread Starter
Member
The results that I am getting show 3 results on the page. When the data is pulled from the database, it is stored in round tables instead of regular tables. It would be easy to generate with tables but I'm trying to do it with the roundedcorners control.
The results show the first results within the roundedcorners table, but the next two only print out the data and not the roundedcorners controls. In order for me to place the data within 3 roundedcorners controls, they need to have different id types, but I don't know how to do it because it generates an error. I might be looking for into it than I have to.
I'm not sure how you would do your idea, can you give me an example?
It's not the size of the dog in the fight, it's the size of the fight in the dog.
-
Aug 16th, 2004, 03:04 PM
#4
I wonder how many charact
A roundedcorners control? Is this a 3rd-party control not included with Visual Studio? I have never heard of it before...
-
Aug 16th, 2004, 03:53 PM
#5
Thread Starter
Member
Yeah, it is. It's a GDI+ from 4guysfromrolla that I downloaded. All it does is give you rounded corners instead of the square corners in a table.
Here is an example of it on this website:
http://scottonwriting.net/demos/RoundedCorners.aspx
I've heard from someone else that I could use a <div> tag with CSS to repeat each roundedcorners control.
It's not the size of the dog in the fight, it's the size of the fight in the dog.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|