Hi,
I have this 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: -
<td>
-
<asp:HyperLink CssClass="toolbar" id="HyperLink"
-
runat="server"></asp:HyperLink>
-
</td>
-
and this is my code behind: -
// 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... 4 3179
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.publi c.dotnet.framew ork.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.
Hi Thubaiti,
This is a classic ASP group. ASP.NET questions are handled in groups with
"aspnet" in their names, such as microsoft.publi c.dotnet.framew ork.aspnet.
Ray at work
"Thubaiti" <Th******@discu ssions.microsof t.com> wrote in message
news:83******** *************** ***********@mic rosoft.com... Hi,
I have this code:
<asp:HyperLin k CssClass="toolb ar" id="HyperLink" runat="server"> </asp:HyperLink>
"Thubaiti" <Th******@discu ssions.microsof t.com> wrote in message
news:83******** *************** ***********@mic rosoft.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.
"Egbert Nierop (MVP for IIS)" wrote: "Thubaiti" <Th******@discu ssions.microsof t.com> wrote in message news:83******** *************** ***********@mic rosoft.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.
Yes, I used Repeater control to do that.. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Amir Eshterayeh |
last post by:
Dear Friends
My asp hyperlink goes to relative address instead of absolute. I like
navigate url goes to outsite link like www.asp.net but now, it goes to
www.mysite/www.asp.net
please help.
I create the navigatURL from database dynamically.
I see the same question mentioned here but the response is not souitable for
me: http://www.dotnet247.com/247reference/msgs/11/57708.aspx
|
by: Martin Dew |
last post by:
Having some problems getting a hyperlink object to work in my repeater
control, It displays the text I have asked it to for the hyperlink, but it
does not act as a link. My repeater code is below but here is the snippet of
my asp:hyperlink object;
<asp:HyperLink
NavigateUrl="authonly/clientdetails.aspx?searchID="+<%#DataBinder.Eval(Conta
iner.DataItem,"CLIENTREF")%>
ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem,...
|
by: Leon |
last post by:
What Am I Doing Wrong? Code Will Not Run, I Can't See The Error! Thanks.
<asp:datalist id="DataList1" runat="server"
RepeatColumns="4">
<ItemTemplate>
<asp:HyperLink
id=HyperLink1
ImageUrl= '<%# String.Format("Toyota/Images/Showroom/" &
Container.DataItem("PathToDisplyPic"))%>'
NavigateUrl='<%#
|
by: Satya |
last post by:
Hi all,
The following code is throwing a run time error "The server tag is not well
formed.
"
<ItemTemplate>
<asp:HyperLink Runat="server" ID="lnkFile"
NavigateUrl="javascript:OpenImage('<%#
DataBinder.Eval(Container.DataItem,"FileName") %>');"><%#
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |