使用使用母版页获取占位符中动态文本框的值。 [英] ow Get value of dynamic textbox in placeholder with use master pages.

查看:66
本文介绍了使用使用母版页获取占位符中动态文本框的值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建页面并添加到带有占位符的页面daynamic文本框。



此页面继承mastrepage。

如何获取动态文本框的值使用母版页的占位符。

  if ((TextBox)PlaceHolder1.FindControl(  TSize)==  null 
txtsize =(TextBox)PlaceHolder1.FindControl( TSize);
else
txtsize.Text = ;

解决方案

  if ((TextBox)PlaceHolder1.FindControl(  TSize)==  null 
txtsize =(TextBox)PlaceHolder1.FindControl( TSize





应该是



< pre lang =c#> if ((TextBox)PlaceHolder1.FindControl( TSize)!= null
txtsize =(TextBox)PlaceHolder1.FindControl( TSize


i create page and add into page daynamic textbox with placeholder.

this page Inheritance mastrepage.
how Get value of dynamic textbox in placeholder with use master pages.

if ((TextBox)PlaceHolder1.FindControl("TSize") == null)
          txtsize = (TextBox)PlaceHolder1.FindControl("TSize");
        else
            txtsize.Text = "";

解决方案

if ((TextBox)PlaceHolder1.FindControl("TSize") == null)
          txtsize = (TextBox)PlaceHolder1.FindControl("TSize")



should be

if ((TextBox)PlaceHolder1.FindControl("TSize") != null)
          txtsize = (TextBox)PlaceHolder1.FindControl("TSize")


这篇关于使用使用母版页获取占位符中动态文本框的值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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