Home All Groups Group Topic Archive Search About

Show ***** only if have a password

Author
9 Apr 2006 8:47 PM
David Thielen
Hi;

When displaying a record, I want to show ***** if they entered a password
and nothing if they did not. Is there a way to do this in the aspx file or do
I need to add a property to the data called ViewPassword?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Author
10 Apr 2006 3:53 AM
agapeton
<asp:TextBox ID="txtPassword" runat="server"
TextMode="Password"></asp:TextBox>
Are all your drivers up to date? click for free checkup

Author
10 Apr 2006 12:59 PM
David Thielen
Hello;

This is for viewing a record, not for creating/editing it. So I don't want
to use a textbox unless there is a way to mark a text box as read-only (is
there?)

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



Show quoteHide quote
"agape***@gmail.com" wrote:

> <asp:TextBox ID="txtPassword" runat="server"
> TextMode="Password"></asp:TextBox>
>
>
Author
10 Apr 2006 2:26 PM
Phillip Williams
If you are databinding within a templated server control, try conditional
evaluation in the databinding expression, e.g.
<asp:Label id="lblPassword" runat="Server"
Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>
Show quoteHide quote
"David Thielen" wrote:

> Hello;
>
> This is for viewing a record, not for creating/editing it. So I don't want
> to use a textbox unless there is a way to mark a text box as read-only (is
> there?)
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>
>
>
> "agape***@gmail.com" wrote:
>
> > <asp:TextBox ID="txtPassword" runat="server"
> > TextMode="Password"></asp:TextBox>
> >
> >
Author
10 Apr 2006 4:24 PM
David Thielen
That sounds perfect - thank you.

Follow on question, is there a reason to use a label? ie, is this:
<asp:Label id="lblPassword" runat="Server"
Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>

better than:
<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



Show quoteHide quote
"Phillip Williams" wrote:

> If you are databinding within a templated server control, try conditional
> evaluation in the databinding expression, e.g.
> <asp:Label id="lblPassword" runat="Server"
> Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "David Thielen" wrote:
>
> > Hello;
> >
> > This is for viewing a record, not for creating/editing it. So I don't want
> > to use a textbox unless there is a way to mark a text box as read-only (is
> > there?)
> >
> > --
> > thanks - dave
> > david_at_windward_dot_net
> > http://www.windwardreports.com
> >
> >
> >
> > "agape***@gmail.com" wrote:
> >
> > > <asp:TextBox ID="txtPassword" runat="server"
> > > TextMode="Password"></asp:TextBox>
> > >
> > >
Author
10 Apr 2006 5:12 PM
Phillip Williams
I would use the label to be able to style it using CSS or SkinIDs, but if you
do not need a separate style for this field then the second options would
work just as fine.
Show quoteHide quote
"David Thielen" wrote:

> That sounds perfect - thank you.
>
> Follow on question, is there a reason to use a label? ie, is this:
> <asp:Label id="lblPassword" runat="Server"
> Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>
>
> better than:
> <%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>
>
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
>
>
>
> "Phillip Williams" wrote:
>
> > If you are databinding within a templated server control, try conditional
> > evaluation in the databinding expression, e.g.
> > <asp:Label id="lblPassword" runat="Server"
> > Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>
> > --
> > HTH,
> > Phillip Williams
> > http://www.societopia.net
> > http://www.webswapp.com
> >
> >
> > "David Thielen" wrote:
> >
> > > Hello;
> > >
> > > This is for viewing a record, not for creating/editing it. So I don't want
> > > to use a textbox unless there is a way to mark a text box as read-only (is
> > > there?)
> > >
> > > --
> > > thanks - dave
> > > david_at_windward_dot_net
> > > http://www.windwardreports.com
> > >
> > >
> > >
> > > "agape***@gmail.com" wrote:
> > >
> > > > <asp:TextBox ID="txtPassword" runat="server"
> > > > TextMode="Password"></asp:TextBox>
> > > >
> > > >
Author
10 Apr 2006 5:41 PM
David Thielen
good point - thanks
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com



Show quoteHide quote
"Phillip Williams" wrote:

> I would use the label to be able to style it using CSS or SkinIDs, but if you
> do not need a separate style for this field then the second options would
> work just as fine.
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "David Thielen" wrote:
>
> > That sounds perfect - thank you.
> >
> > Follow on question, is there a reason to use a label? ie, is this:
> > <asp:Label id="lblPassword" runat="Server"
> > Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>
> >
> > better than:
> > <%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>
> >
> > --
> > thanks - dave
> > david_at_windward_dot_net
> > http://www.windwardreports.com
> >
> >
> >
> > "Phillip Williams" wrote:
> >
> > > If you are databinding within a templated server control, try conditional
> > > evaluation in the databinding expression, e.g.
> > > <asp:Label id="lblPassword" runat="Server"
> > > Text='<%#Eval("Password").ToString().Equals(String.Empty)?"":"******"%>'/>
> > > --
> > > HTH,
> > > Phillip Williams
> > > http://www.societopia.net
> > > http://www.webswapp.com
> > >
> > >
> > > "David Thielen" wrote:
> > >
> > > > Hello;
> > > >
> > > > This is for viewing a record, not for creating/editing it. So I don't want
> > > > to use a textbox unless there is a way to mark a text box as read-only (is
> > > > there?)
> > > >
> > > > --
> > > > thanks - dave
> > > > david_at_windward_dot_net
> > > > http://www.windwardreports.com
> > > >
> > > >
> > > >
> > > > "agape***@gmail.com" wrote:
> > > >
> > > > > <asp:TextBox ID="txtPassword" runat="server"
> > > > > TextMode="Password"></asp:TextBox>
> > > > >
> > > > >

Bookmark and Share