|
-
Dec 4th, 2008, 06:42 AM
#1
Thread Starter
Fanatic Member
dynamic link button
hi,
please look at the image attached.
In that image you could see current active user link button. i think this would be dynamically generated. i would like to know how this could be achieve in asp.net? which control should i use?i would like to show the button as vertically with some distance between the users.please let me know if there is any sample code for this to understand.
Last edited by karthikeyan; Mar 4th, 2009 at 10:06 AM.
Loving dotnet
-
Dec 4th, 2008, 07:41 AM
#2
Frenzied Member
Re: dynamic link button
You would still use a LinkButton but you would just create a procedure to dynamically create them all.
Dim linkB as New LinkButton
LinkB.Text = "Besoup"
'set other properties
Me.Form.Controls.Add(LinkB)
-
Dec 4th, 2008, 11:22 PM
#3
Thread Starter
Fanatic Member
Re: dynamic link button
hi, i know how to create dynamic controls.but i have a doubt in the space beweenn the dynmics controls.because if u see the link which i mentioned in the above thread it is vey nice to see.because the space between each link button look and feel is good. like that i have to do.is there any samples please share with me .
-
Dec 6th, 2008, 12:38 AM
#4
Re: dynamic link button
You can use DataBinding controls like Repeater. In a Repeater, add a LinkButton, add your custom formatting (adding space, seperators etc.), get data in dataset or datatable, and bind it. No need to dynamically add controls.
Well, this is just another way of skinning a cat (as Mendhak claims).
-
Dec 6th, 2008, 06:39 AM
#5
Re: dynamic link button
There are a bajillion ways to do this.
You could use a Literal control and in the code behind, dynamically add anchor tags with the correct urls.
You could use a Panel control and dynamically add LinkButton controls.
There are many ways. All of them basically involve getting the correct data form your database and writing it out in the address.
-
Dec 8th, 2008, 03:37 PM
#6
Re: dynamic link button
If you want vertical, go for a repeater. Define your Template in the repeater with the right spacing that you need. If you're not clear, then do a search on any of the control names that we have given you. It's a simple matter of defining your own template that will be rendered out.
I think your main concern should be how you're going to get the list of logged on users. Or have you figured that out already?
-
Dec 17th, 2008, 10:26 PM
#7
Thread Starter
Fanatic Member
Re: dynamic link button
Thank you guys for the efficient answers.
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
|