Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

asp:HyperLink array ?!
Hi,

I have this code:

code:
<td> <a href="#" class="toolbar">Computers</a> <a href="commun.html" class="toolbar">Communications</a> <a href="electronics.html" class="toolbar">Electronics</a> <a href="#" class="toolbar">Others</a> </td>
After that, I want to get the information from the database, so I changed my code to:
code:
<td> <asp:HyperLink CssClass="toolbar" id="HyperLink" runat="server"></asp:HyperLink> </td>
and this is my code behind:
code:
// sqlConnection String connectionString = "server=ICSFREEDOM; TRUSTED_CONNECTION=true; database=Offers"; // command string String commandString = "SELECT name FROM swe_category"; // data adapter sqlDataAdapter = new SqlDataAdapter(commandString, connectionString); // data set DataSet dataSet = new DataSet(); // fill sqlDataAdapter.Fill(dataSet, "swe_category"); // data table DataTable dataTable = dataSet.Tables[0]; foreach(DataRow dataRow in dataTable.Rows) { HyperLink.Text = dataRow["name"].ToString(); HyperLink.NavigateUrl = dataRow["name"].ToString() + ".aspx"; }
Now, the problem is: I do not know how can I create an array of asp:HyperLink Any help please ?! thanks...

Report this thread to moderator Post Follow-up to this message
Old Post
Thubaiti
12-17-04 08:55 PM


Re: asp:HyperLink array ?!
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person  here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Report this thread to moderator Post Follow-up to this message
Old Post
Bob Barrows [MVP]
12-17-04 08:55 PM


Re: asp:HyperLink array ?!
Hi Thubaiti,

This is a classic ASP group.  ASP.NET questions are handled in groups with
"aspnet" in their names, such as microsoft.public.dotnet.framework.aspnet.

Ray at work

"Thubaiti" <Thubaiti@discussions.microsoft.com> wrote in message
news:8396F7D9-1971-43AB-861F-BD0E86805459@microsoft.com...
> Hi,
>
> I have this code:

> <asp:HyperLink CssClass="toolbar" id="HyperLink"
> runat="server"></asp:HyperLink>



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
12-17-04 08:55 PM


Re: asp:HyperLink array ?!
"Thubaiti" <Thubaiti@discussions.microsoft.com> wrote in message
news:8396F7D9-1971-43AB-861F-BD0E86805459@microsoft.com...
> Hi,

Indeed, an asp.net question.
But basically, you should use a -datarepeater- control, where you can bind
your data to the template that you define yourself.


Report this thread to moderator Post Follow-up to this message
Old Post
Egbert Nierop \(MVP for IIS\)
12-18-04 05:46 PM


Re: asp:HyperLink array ?!

"Egbert Nierop (MVP for IIS)" wrote:

> "Thubaiti" <Thubaiti@discussions.microsoft.com> wrote in message
> news:8396F7D9-1971-43AB-861F-BD0E86805459@microsoft.com... 
>
> Indeed, an asp.net question.
> But basically, you should use a -datarepeater- control, where you can bind
> your data to the template that you define yourself.
>
>

Yes, I used Repeater control to do that..

Report this thread to moderator Post Follow-up to this message
Old Post
Thubaiti
12-18-04 05:46 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Forum Jump:
All times are GMT. The time now is 07:52 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.