使用asp panel 设置隐藏和显示不起作用〉?

dhdhzzw 2009-08-11 11:46:03
前台:<asp:Panel ID="Panel1" runat="server" BorderWidth="0px" Visible="False" Width="100%">
www
</asp:Panel >
点击按钮 想让这个层显示



protected void Duty_gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
ImageButton TempIB_Mod = (ImageButton)e.Row.FindControl("lb_mod");
TempIB_Mod.CommandName = "Duty_Mod";
TempIB_Mod.CommandArgument = e.Row.RowIndex.ToString();





后台
:
protected void Duty_gv_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument.ToString());
GridViewRow GvRow = Duty_gv.Rows[index];
SqlCommand cmd = DbClass.getCMD();
switch (e.CommandName)
{

case "Duty_Mod":
try
{


this.Panel1.Visible = true;
值可以传过来,但层就是不显示


...全文
138 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wdwlbsm1 2009-08-11
  • 打赏
  • 举报
回复
这样做是没有用的,页面刷新的问题

你可以使用JS DIV 来实现,
dhdhzzw 2009-08-11
  • 打赏
  • 举报
回复
我这个放在updatepanel外面的//
lunasea0_0 2009-08-11
  • 打赏
  • 举报
回复
是不是用了UpdatePanel这样的东西,如果用了UpdatePanel,只能更新UpdatePanel之间的区域。

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧