Hi,
I have a link that is coming from the database.Now if the link is
empty i dont want to display in datalist .How can i do that?
<td><asp:DataLi st id="DataList1" Runat="server"
RepeatDirection ="Horizontal " RepeatColumns=" 3" CellPadding="5"
CellSpacing="2" Width="100%" EnableViewState ="False">
<itemtemplate >
<b>
<%# DataBinder.Eval (Container.Data Item, "FIRST_NAME ") %>
<%# DataBinder.Eval (Container.Data Item, "MIDDLE_NAM E") %>
<%# DataBinder.Eval (Container.Data Item, "LAST_NAME" ) %>
</b>
<br>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS1") %>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS2") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "CITY") %>
<%# DataBinder.Eval (Container.Data Item, "STATE") %>
<%# DataBinder.Eval (Container.Data Item, "ZIP_CODE") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "TELEPHONE" ) %>
<br>
<%# DataBinder.Eval (Container.Data Item, "EMAIL") %>
<br>
<a id="Resume" href="<%#
DataBinder.Eval (Container.Data Item, "BIO_RESUME ") %>" name="Resume"
Target="_blank" >click here for bio/resume</a></b>
</itemtemplate>
</asp:DataList></td>
Thanks,
Vishnu 3 2861
A quick solution is in your query return a # when the url field is
null
On 1 Dec 2006 11:21:11 -0800, "vishnu" <se****@gmail.c omwrote:
> Hi,
I have a link that is coming from the database.Now if the link is empty i dont want to display in datalist .How can i do that?
<td><asp:DataL ist id="DataList1" Runat="server" RepeatDirectio n="Horizontal " RepeatColumns=" 3" CellPadding="5" CellSpacing="2 " Width="100%" EnableViewState ="False">
<itemtemplate >
<b>
<%# DataBinder.Eval (Container.Data Item, "FIRST_NAME ") %>
<%# DataBinder.Eval (Container.Data Item, "MIDDLE_NAM E") %>
<%# DataBinder.Eval (Container.Data Item, "LAST_NAME" ) %>
</b>
<br>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS1") %>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS2") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "CITY") %>
<%# DataBinder.Eval (Container.Data Item, "STATE") %>
<%# DataBinder.Eval (Container.Data Item, "ZIP_CODE") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "TELEPHONE" ) %>
<br>
<%# DataBinder.Eval (Container.Data Item, "EMAIL") %>
<br>
<a id="Resume" href="<%# DataBinder.Eva l(Container.Dat aItem, "BIO_RESUME ") %>" name="Resume" Target="_blank ">click here for bio/resume</a></b>
</itemtemplate>
</asp:DataList></td>
Thanks, Vishnu
--
Bits.Bytes. http://bytes.thinkersroom.com
Hi,
Thanks for your suggestion. I have written a function to handle this.
public string ShowLink(object row)
{
string resume=DataBind er.Eval(row,"BI O_RESUME") as string;
if(resume==null || resume.Trim().L ength==0)
{
return "<p>No Data</p>";
}
else
return "<a href='<%#Contai ner.DataItem %>' Target="_blank" '>" +
+ "View Bio Resume</a>";
}
Please let me know if this works.
Thanks,
Vishnu
Rad [Visual C# MVP] wrote:
A quick solution is in your query return a # when the url field is
null
On 1 Dec 2006 11:21:11 -0800, "vishnu" <se****@gmail.c omwrote:
Hi,
I have a link that is coming from the database.Now if the link is
empty i dont want to display in datalist .How can i do that?
<td><asp:DataLi st id="DataList1" Runat="server"
RepeatDirection ="Horizontal " RepeatColumns=" 3" CellPadding="5"
CellSpacing="2" Width="100%" EnableViewState ="False">
<itemtemplate >
<b>
<%# DataBinder.Eval (Container.Data Item, "FIRST_NAME ") %>
<%# DataBinder.Eval (Container.Data Item, "MIDDLE_NAM E") %>
<%# DataBinder.Eval (Container.Data Item, "LAST_NAME" ) %>
</b>
<br>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS1") %>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS2") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "CITY") %>
<%# DataBinder.Eval (Container.Data Item, "STATE") %>
<%# DataBinder.Eval (Container.Data Item, "ZIP_CODE") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "TELEPHONE" ) %>
<br>
<%# DataBinder.Eval (Container.Data Item, "EMAIL") %>
<br>
<a id="Resume" href="<%#
DataBinder.Eval (Container.Data Item, "BIO_RESUME ") %>" name="Resume"
Target="_blank" >click here for bio/resume</a></b>
</itemtemplate>
</asp:DataList></td>
Thanks,
Vishnu
--
Bits.Bytes. http://bytes.thinkersroom.com
Hi,
Thanks for your suggestion. I have written a function to handle this.
public string ShowLink(object row)
{
string resume=DataBind er.Eval(row,"BI O_RESUME") as string;
if(resume==null || resume.Trim().L ength==0)
{
return "<p>No Data</p>";
}
else
return "<a href='<%#Contai ner.DataItem %>' Target="_blank" '>" +
+ "View Bio Resume</a>";
}
Please let me know if this works.
Thanks,
Vishnu
Rad [Visual C# MVP] wrote:
A quick solution is in your query return a # when the url field is
null
On 1 Dec 2006 11:21:11 -0800, "vishnu" <se****@gmail.c omwrote:
Hi,
I have a link that is coming from the database.Now if the link is
empty i dont want to display in datalist .How can i do that?
<td><asp:DataLi st id="DataList1" Runat="server"
RepeatDirection ="Horizontal " RepeatColumns=" 3" CellPadding="5"
CellSpacing="2" Width="100%" EnableViewState ="False">
<itemtemplate >
<b>
<%# DataBinder.Eval (Container.Data Item, "FIRST_NAME ") %>
<%# DataBinder.Eval (Container.Data Item, "MIDDLE_NAM E") %>
<%# DataBinder.Eval (Container.Data Item, "LAST_NAME" ) %>
</b>
<br>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS1") %>
<%# DataBinder.Eval (Container.Data Item, "ADDRESS2") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "CITY") %>
<%# DataBinder.Eval (Container.Data Item, "STATE") %>
<%# DataBinder.Eval (Container.Data Item, "ZIP_CODE") %>
<br>
<%# DataBinder.Eval (Container.Data Item, "TELEPHONE" ) %>
<br>
<%# DataBinder.Eval (Container.Data Item, "EMAIL") %>
<br>
<a id="Resume" href="<%#
DataBinder.Eval (Container.Data Item, "BIO_RESUME ") %>" name="Resume"
Target="_blank" >click here for bio/resume</a></b>
</itemtemplate>
</asp:DataList></td>
Thanks,
Vishnu
--
Bits.Bytes. http://bytes.thinkersroom.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: R. Rajesh Jeba Anbiah |
last post by:
Sometimes ago I started a thread
<http://groups.google.com/groups?threadm=abc4d8b8.0404012208.76ebdba7%40posting.google.com>
<Previous post>
I'm supposed to hide the php extension in a file (like Yahoo! or
Google). For example, http://foo.com/foo instead of
http://foo.com/foo.php. I have read various articles including
<http://in2.php.net/security.hiding> . Certainly mod_rewrite is not
the right option. In Apache, "file.php" & "file"...
|
by: splish |
last post by:
Hello,
I have the following problem:
An Iframe exists inside a page (that has content exceeding the height,
therefore scrollbars kick in) - normal stuff.
When I want to use anchor references inside the Iframe the parent
page is affected also, in that it jumps to the top of the iframe, as though
there were an anchor at that point.
|
by: Richard Brown |
last post by:
Ok, I celebrate and rejoice in the Anchor property. So wonderful compared
to the horrible 'resize' code I had to write in VB6, there is just no end to
the wonders of VB.NET..... uh, ok..... BUT...
I have a form with a lot of controls side by side, etc. The Anchor is
really only useful to resize 1 control on each line (and move all the
others). BUT, does anyone have any articles or other ways to do this?
For example, I am working on...
|
by: gary |
last post by:
Hi,
I am trying to reference an anchor in a user control with a url. This
worked in 1.1 but no longer works in 2.0.
The ascx control is located in a "/include" folder
If you have a hyperlink control and you assign the navigateurl property =
"../#anchor" whereby you want to add this # reference to the current url the
url ends up with the #anchor twice.
|
by: das |
last post by:
hello all,
this might be simple:
I populate a temp table based on a condition from another table:
select @condition = condition from table1 where id=1
in my stored procedure I want to do this:
if @condition = 0
| |
by: rudranee |
last post by:
Hi,
Can i hide an anchor tag in the mailto form?so that only the receiver
is able to see it.
The refernce code is given here:
<FORM METHOD=POST ACTION="mailto:abc@xyz.com" ENCTYPE="text/plain">
<TEXTAREA NAME="COMMENTS" ROWS="10" COLS="40" WRAP="hard">
Dear Sir/Madam,
------
|
by: Joseph Gruber |
last post by:
Hi all -- I have two questions.
First, I'm adding a control to my form at runtime and the control/form
seems to ignore the anchor property of the runtime control. Any idea
how I can get a runtime control to anchor properly?
Second -- the program I'm writting is supposed to look like a dos
application (long story). When the application is "Normal" aka a
small window then everything looks great. But when I resize the
window to...
|
by: gvrajkumar |
last post by:
Hi
We are developing an Ajax based application. In this application the
URL is fixed and as user navigates on the application we will change
Anchor on the URL so that user can bookmark the url and can load the
page on demand.
When user refreshes the page we have no issue in the populating the
page based on the anchor in URL as on load we can capture the
hash(#anchor) and act accordingly.
|
by: sindhu |
last post by:
Hello,
I'm loading a frame from another frame using anchor tag.
the code is as folllows.
function change_page
{
if(document.form.txtbx1.value=="all")
{
document.getElementById('a_link').target="right_bottom";
|
by: matt |
last post by:
Hello group,
I'm trying to become familiar with the information hiding design rules, and I
have a lot (3) of questions for all you experts. AFAIK, a generic module has 2
files:
================
module.h
================
#ifndef __MODULE_HDR_INCLUDED__
|
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: 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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: 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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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...
| |