473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Hyperlink text issue-----need help

3
Hi,
I have a datalist.what i want to do is to show my data from database as hyperlinks, and when i click on any of that link it redirects to other page. In that directed page i am getting the link text by "querystring". Every thing is working fine but the problem is that when i put the same datalist inside a tab container the "querystring" returns Null.
can any one help please how can i get the hyperlink text??

here is the code.

.cs file

Expand|Select|Wrap|Line Numbers
  1.  
  2.  da.SelectCommand.CommandText= strQuery;
  3.         DataSet myds = new DataSet();
  4.         da.Fill(myds);
  5.         DataList1.DataSource = myds;
  6.  
  7.         DataList1.DataBind();
  8.  
  9.  protected void databound(object sender, DataListItemEventArgs e)
  10.     {
  11.         HyperLink hpclk = (HyperLink)(e.Item.FindControl("hlpnews"));
  12.  
  13.         hpclk.NavigateUrl = "~/NewFolder1/main.aspx";
  14.     }
  15.  
  16.  
  17.  
.aspx file

Expand|Select|Wrap|Line Numbers
  1.  
  2. <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
  3.         Width="409px" Height="237px">
  4.         <cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
  5.          <HeaderTemplate>
  6.                  A
  7.           </HeaderTemplate>
  8.         <ContentTemplate>
  9.         <asp:DataList ID="DataList1" runat="server" 
  10.         Font-Size="Medium"  repeatColumns="2" OnItemDataBound ="databound" Height="105px"><ItemTemplate><asp:HyperLink runat ="server" OnLoad="link" ID="hlpnews" text='<%#DataBinder.Eval(Container.DataItem,"Medicine") %>'> </asp:HyperLink></ItemTemplate>
  11.  
  12.             </asp:DataList>
  13.         </ContentTemplate>
  14.         </cc1:TabPanel>
  15.  </cc1:TabContainer>
  16.  
  17.  
Feb 15 '10 #1
1 1753
Frinavale
9,735 Expert Mod 8TB
Please do not double post your question.
This divides our attempts to help you, making it harder for us to give you an answer (because we can't see what others have already recommended to you) and it makes it difficult for you to get an answer (because you have more than one place to look for any possible answers).

I've closed this thread. Please refer to your other thread regarding this issue for more help. It can be found here: DataList inside TabContainer doesn't Show links

-Moderator Frinny
Feb 16 '10 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim C | last post by:
I saw the WTL library that can be used, but not supported my Microsoft, to make a hyperlink in a dialog box. Is there any supported solution by Microsoft ? What we are looking for is hyper text...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
0
by: Joe Delphi | last post by:
Hi, I dropped a hyperlink text control onto my web page and set the font for X-Small and Italics to True. When I do a View In Browser it displays with the default font size and not...
3
by: Ruth Sanders | last post by:
VB 6: I need to provide a text box that allows a user to enter working hyperlinks without typing the html code. I currently send the text box contents (textbox.text) as an email message...I need the...
3
by: Bren | last post by:
Hi All VS2005 Gridview control with vb I am populating a gridview of company staff. One of the columns is a hyperlink to a SMS texting facility I have so secrataries can text the managers...
3
by: avanti | last post by:
HI, I have a HyperLink in my code. It has a OnClick function defined. I am trying to access the text property of the HyperLink in my JavaScript function. ...
1
by: sbettadpur | last post by:
here i have an hyper link with emailid. if i click on hyperlink it has to popup a window with in that window i need to print selected hyper link text eg: hyperlink xx@example.com if i...
4
by: alun65 | last post by:
I'm attempting to programmatically build up some HTML in the code behind. Like so: // Create Hyperlink HyperLink link = new HyperLink(); link.NavigateUrl = "nice cat"; link.Text = "Cats...
2
by: rpdavis | last post by:
I have a datagrid that includes editable colums as well as a hyperlink. When the user selects to edit a row in the datagrid, the text for the hyperlink disappears. When the grid is refreshed...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.