隐藏在转发器中的字段 [英] Hiding a field in a repeater

查看:80
本文介绍了隐藏在转发器中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的中继器中隐藏下面的Pin字段。我该怎么做?


< asp:Repeater ID =" Repeater1" runat =" server"

DataSourceID =" SqlDataSource1">


< ItemTemplate>

< tr>

< td>< font color ="#330099">声明SSN:< / font>< b><%#

Eval( ClaimSSN)%>< / b>< / td>

< td colspan =" 2">< / td>

< td>< font color ="#330099"> BIC:< / font>< b><%#Eval(" BIC")%>< /

b>< / td>


< td colspan =" 2">< / td>


< ; td colspan =" 2">< font color ="#330099"> BIC SSN:< / font>< b><%#

Eval("" BICSSN")%>< / b>< / td>


< tr>< / tr>

< td colspan = " 7">< / td>


< td colspan =" 7">< font color ="#330099">状态码:< ; / font>< b><

% #Eval(" StatusCode")%>< / b>< / td>


< / font>< b><%#Eval(" Pin") %>< / label>< / b>< / tr>

< / ItemTemplate>

< SeparatorTemplate>

< tr>

< td colspan =" 100%">< hr size =" 1" color =#330099 />< br />


< / td>

< / tr>

< / SeparatorTemplate>

< FooterTemplate>

< / table>

< / FooterTemplate>

< / asp:Repeater>

解决方案

隐藏你究竟是什么意思???


这样做<! - <%#Eval(" Pin")%> - 它将隐藏在浏览器中....


或如何不拥有<%#Eval(" Pin")%?它将被真正隐藏

然后:)


乔治。

" JJ297" < nc *** @ yahoo.com写了留言

新闻:24 *************************** ******* @ p25g2000 hsf.googlegroups.com ...


>我想在我的转发器中隐藏下面的Pin字段。我该怎么做?


< asp:Repeater ID =" Repeater1" runat =" server"

DataSourceID =" SqlDataSource1">


< ItemTemplate>

< tr>

< td>< font color ="#330099">声明SSN:< / font>< b><%#

Eval( ClaimSSN)%>< / b>< / td>

< td colspan =" 2">< / td>

< TD><字体颜色= QUOT;#330099"> BIC:其中/字体>< b取代;<%#的eval(" BIC")%>< /

b>< / td>


< td colspan =" 2">< / td>


< ; TD列跨度= QUOT; 2英寸;><字体颜色= QUOT;#330099"> BIC SSN:其中/字体>< b取代;<%#

的eval(" BICSSN")%>< / b>< / td>


< tr>< / tr>

< td colspan = " 7">< / td>


< td colspan =" 7">< font color = "#330099">状态码:其中/字体>< b取代;<

%#的eval("的StatusCode")%>< / B>< / TD> ;


< td>< label runat =" server" id =" lbl">< font color ="#330099"> Pin:

< / font>< b><%#Eval(" Pin") %>< / label>< / b>< / tr>

< / ItemTemplate>

< SeparatorTemplate>

< tr>

< td colspan =" 100%">< hr size =" 1" color =#330099 />< br />


< / td>

< / tr>

< / SeparatorTemplate>

< FooterTemplate>

< / table>

< / FooterTemplate>

< / asp:Repeater>



3月31日,2:52 * pm,George Ter-Saakov < gt -... @ cardone.comwrote:


隐藏你究竟是什么意思???


Do它喜欢<! - <%#Eval(" Pin")%> - 它将隐藏在浏览器中....


或者怎么样根本没有<%#Eval(" Pin")%?它将被真正隐藏

然后:)


乔治。


" JJ297" < nc ... @ yahoo.com写了留言


新闻:24 *********************** *********** @ p25g2000 hsf.googlegroups.com ...


我想在我的中继器中隐藏下面的Pin字段。 *我该怎么做呢?


< asp:Repeater ID =" Repeater1" runat =" server"

DataSourceID =" SqlDataSource1">


* * * * *< ItemTemplate>

* * * *< tr>

* * * *< td>< font color ="#330099">声明SSN:< / font>< b><%#

Eval(" ; ClaimSSN")%>< / b>< / td>

* * * *< td colspan =" 2">< / td>

* * * *< td>< font color ="#330099"> BIC:< / font>< b><%#Eval(" BIC")%>< /

b>< / td>


* * * *< td colspan =" 2">< / td>


* * * *< td colspan =" 2">< font color ="#330099"> BIC SSN: < / font>< b><%#

Eval(" BICSSN")%>< / b>< / td>


* * * *< tr>< / tr>

* * * *< td colspan = " 7英寸;>< / TD>


* * * *< td colspan =" 7">< font color ="#330099">状态代码: < / font>< b><

%#Eval(" StatusCode")%>< / b>< / td>


* * * *< td>< label runat =" server" id =" lbl">< font color ="#330099"> Pin:

< / font>< b><%#Eval(" Pin") %>< / label>< / b>< / tr>

* * * *< / ItemTemplate>

* * *< SeparatorTemplate>

* * * *< tr>

* * * *< td colspan =" 100%">< hr size =" 1" color =#330099 />< br />


* * * *< / td>

* * * *< / tr>

* * * *< / SeparatorTemplate>

* * * *< FooterTemplate>

* * * *< / table>

* * * *< / FooterTemplate>

* * * *< / asp:Repeater> - 隐藏引用文字 -



- 显示引用的文字 -



如果此人拥有经理权利,我想在网页上设置安全性

他们将拥有引脚区域可见。


所以我会说类似的东西:


如果Session(CSI)= true那么

引脚区域可见


其他


引脚区域不可见


我希望这是有道理的

我想要Pin字段


我现在看到了....

最好的方法是遵循....

在页面上的代码中创建一个函数(C#示例,但你嘘不能

将其转换为VB.NET有问题。


受保护的字符串GetPin(string sPin)

{

if(_iLevel 1)

返回sPin;

else

返回" ******" ;;

}
你的aspx页面中的
而不是

<%#Eval(" Pin")%>

有类似

<%#GetPin((string)DataBinder.Eval(Container.DataItem," Pin"))%>

请记住,Eval是功能,你总是可以创建自己的

版本.....

乔治。



JJ297 < nc *** @ yahoo.com写了留言

新闻:5f *************************** ******* @ 8g2000hs e.googlegroups.com ...

3月31日下午2:52,George Ter-Saakov < gt -... @ cardone.comwrote:


隐藏你究竟是什么意思???


Do它喜欢<! - <%#Eval(" Pin")%> - 它将隐藏在浏览器中....


或者怎么样根本没有<%#Eval(" Pin")%?它将被真正隐藏

然后:)


乔治。


" JJ297" < nc ... @ yahoo.com写了留言


新闻:24 *********************** *********** @ p25g2000 hsf.googlegroups.com ...


我想在我的中继器中隐藏下面的Pin字段。我该怎么做呢?


< asp:Repeater ID =" Repeater1" runat =" server"

DataSourceID =" SqlDataSource1">


< ItemTemplate>

< tr>

< td><字体颜色= QUOT;#330099">声明SSN:其中/字体>< b取代;<%#

的eval(" ClaimSSN")%>< / b>< ; / TD>

将TD列跨度= QUOT; 2英寸;>< / TD>

将TD><字体颜色= QUOT;#330099" > BIC:< / font>< b><%#Eval(" BIC")%>< /

b>< / td>


< td colspan =" 2">< / td>

将TD列跨度= QUOT; 2英寸;><字体颜色= QUOT;#330099"> BIC SSN:其中/字体> ;< b><%#

Eval(" BICSSN")%>< / b>< / td>


< tr>< / tr>

< td colspan =" 7">< / TD>


< td colspan =" 7">< font color ="#330099">状态码:< / font> ;< b><

%#Eval(" StatusCode")%>< / b>< / td>


< td>< label runat =" server" id =" lbl">< font color ="#330099"> Pin:

< / font>< b><%#Eval(" Pin") %>< / label>< / b>< / tr>

< / ItemTemplate>

< SeparatorTemplate>

< tr>

< td colspan =" 100%">< hr size =" 1" color =#330099 />< br />


< / td>

< / tr>

< / SeparatorTemplate> ;

< FooterTemplate>

< / table>

< / FooterTemplate>

< / asp:Repeater> - 隐藏引用的文字 -



- 显示引用的文字 -



我想放如果该人拥有经理权利,页面上的安全性

他们将显示Pin字段。


所以我会提出类似的内容:


如果Session(CSI)= true则


引脚区域可见


else


引脚区域不可见


我希望有意义

我想要Pin字段

I want to hide the Pin field below in my repeater. How do I do this?

<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">

<ItemTemplate>
<tr>
<td><font color="#330099">Claim SSN: </font><b><%#
Eval("ClaimSSN") %></b></td>
<td colspan="2"></td>
<td><font color="#330099">BIC: </font><b><%# Eval("BIC") %></
b></td>

<td colspan="2"></td>

<td colspan="2"><font color="#330099">BIC SSN: </font><b><%#
Eval("BICSSN") %></b></td>

<tr></tr>
<td colspan="7"></td>

<td colspan="7"><font color="#330099">Status Code: </font><b><
%# Eval("StatusCode")%></b></td>

<td><label runat="server" id="lbl"><font color="#330099">Pin:
</font><b><%#Eval("Pin")%></label></b></tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan="100%"><hr size="1" color=#330099 /><br />

</td>
</tr>
</SeparatorTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>

解决方案

By hiding what exactly you mean???

Do it like <!--<%#Eval("Pin")%>--and it will be hidden in a browser....

Or how about not to have <%#Eval("Pin")%at all? It will be really hidden
then :)

George.
"JJ297" <nc***@yahoo.comwrote in message
news:24**********************************@p25g2000 hsf.googlegroups.com...

>I want to hide the Pin field below in my repeater. How do I do this?

<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">

<ItemTemplate>
<tr>
<td><font color="#330099">Claim SSN: </font><b><%#
Eval("ClaimSSN") %></b></td>
<td colspan="2"></td>
<td><font color="#330099">BIC: </font><b><%# Eval("BIC") %></
b></td>

<td colspan="2"></td>

<td colspan="2"><font color="#330099">BIC SSN: </font><b><%#
Eval("BICSSN") %></b></td>

<tr></tr>
<td colspan="7"></td>

<td colspan="7"><font color="#330099">Status Code: </font><b><
%# Eval("StatusCode")%></b></td>

<td><label runat="server" id="lbl"><font color="#330099">Pin:
</font><b><%#Eval("Pin")%></label></b></tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan="100%"><hr size="1" color=#330099 /><br />

</td>
</tr>
</SeparatorTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>



On Mar 31, 2:52*pm, "George Ter-Saakov" <gt-...@cardone.comwrote:

By hiding what exactly you mean???

Do it like <!--<%#Eval("Pin")%>--and it will be hidden in a browser....

Or how about not to have <%#Eval("Pin")%at all? It will be really hidden
then :)

George.

"JJ297" <nc...@yahoo.comwrote in message

news:24**********************************@p25g2000 hsf.googlegroups.com...

I want to hide the Pin field below in my repeater. *How do I do this?

<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">

* * * * * <ItemTemplate>
* * * *<tr>
* * * *<td><font color="#330099">Claim SSN: </font><b><%#
Eval("ClaimSSN") %></b></td>
* * * * <td colspan="2"></td>
* * * * <td><font color="#330099">BIC: </font><b><%# Eval("BIC") %></
b></td>

* * * * <td colspan="2"></td>

* * * * <td colspan="2"><font color="#330099">BIC SSN: </font><b><%#
Eval("BICSSN") %></b></td>

* * * * <tr></tr>
* * * * <td colspan="7"></td>

* * * * <td colspan="7"><font color="#330099">Status Code: </font><b><
%# Eval("StatusCode")%></b></td>

* * * *<td><label runat="server" id="lbl"><font color="#330099">Pin:
</font><b><%#Eval("Pin")%></label></b></tr>
* * * *</ItemTemplate>
* * *<SeparatorTemplate>
* * * *<tr>
* * * *<td colspan="100%"><hr size="1" color=#330099 /><br/>

* * * *</td>
* * * *</tr>
* * * *</SeparatorTemplate>
* * * *<FooterTemplate>
* * * *</table>
* * * *</FooterTemplate>
* * * *</asp:Repeater>- Hide quoted text -


- Show quoted text -

I want to put security on the page if the person has manager rights
they will have the Pin field visible.

So I will put something like:

If Session(CSI) = true then

the pin field is visible

else

the pin field in not visible

I hope that makes sense
I want the Pin field


I see it now....
The best way to do is following....
in your code on the page make a function (C# example, but you should not
have a problem to convert it to VB.NET)

protected string GetPin(string sPin)
{
if( _iLevel 1 )
return sPin;
else
return "******";
}
in your aspx page instead of
<%#Eval("Pin")%>
have something like
<%# GetPin((string)DataBinder.Eval(Container.DataItem, "Pin"))%>
Remember, Eval is the function and you always can create your own
version.....
George.


"JJ297" <nc***@yahoo.comwrote in message
news:5f**********************************@8g2000hs e.googlegroups.com...
On Mar 31, 2:52 pm, "George Ter-Saakov" <gt-...@cardone.comwrote:

By hiding what exactly you mean???

Do it like <!--<%#Eval("Pin")%>--and it will be hidden in a browser....

Or how about not to have <%#Eval("Pin")%at all? It will be really hidden
then :)

George.

"JJ297" <nc...@yahoo.comwrote in message

news:24**********************************@p25g2000 hsf.googlegroups.com...

I want to hide the Pin field below in my repeater. How do I do this?

<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">

<ItemTemplate>
<tr>
<td><font color="#330099">Claim SSN: </font><b><%#
Eval("ClaimSSN") %></b></td>
<td colspan="2"></td>
<td><font color="#330099">BIC: </font><b><%# Eval("BIC") %></
b></td>

<td colspan="2"></td>

<td colspan="2"><font color="#330099">BIC SSN: </font><b><%#
Eval("BICSSN") %></b></td>

<tr></tr>
<td colspan="7"></td>

<td colspan="7"><font color="#330099">Status Code: </font><b><
%# Eval("StatusCode")%></b></td>

<td><label runat="server" id="lbl"><font color="#330099">Pin:
</font><b><%#Eval("Pin")%></label></b></tr>
</ItemTemplate>
<SeparatorTemplate>
<tr>
<td colspan="100%"><hr size="1" color=#330099 /><br />

</td>
</tr>
</SeparatorTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>- Hide quoted text -


- Show quoted text -

I want to put security on the page if the person has manager rights
they will have the Pin field visible.

So I will put something like:

If Session(CSI) = true then

the pin field is visible

else

the pin field in not visible

I hope that makes sense
I want the Pin field


这篇关于隐藏在转发器中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆