惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
V
Visual Studio Blog
L
LangChain Blog
A
About on SuperTechFans
B
Blog
T
Tenable Blog
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
WordPress大学
WordPress大学
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
C
Check Point Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
S
Securelist
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Latest news
Latest news
GbyAI
GbyAI
T
Troy Hunt's Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 热门话题
V2EX - 技术
V2EX - 技术
小众软件
小众软件
Google DeepMind News
Google DeepMind News
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed

博客园 - javaca88

SQL高级语法汇总 textaera maxlength - javaca88 - 博客园 聚焦索引与非聚焦索引及其查询效率 zhuan - javaca88 - 博客园 博文阅读密码验证 - 博客园 FormView1.ChangeMode 最经典的实现字符数控制的方案哦!(完善版)(转) JavaScript实际应用:父子页面交互 FormView1 动态传参数 如何取得treeview的节点的checkbox的value值 - javaca88 - 博客园 DetailsView1 动态添加自动列 - javaca88 - 博客园 技术网站收录 grid view控件中经常会遇到选择行的问题,怎么才能获得当前行呢 step by step 7 转:C#.Net的常见面试试题 zuo ye 缓冲池 Assembly.Load 获取硬盘序列号 split 正确用法 在SQLSERVER里写了一个Split函数
要用到的代码2 - javaca88 - 博客园
javaca88 · 2006-10-25 · via 博客园 - javaca88

<asp:objectdatasource
          id="ObjectDataSource1"
          runat="server"
          selectmethod="GetEmployee"
          typename="Samples.AspNet.CS.EmployeeLogic" >
          <selectparameters>
            <asp:querystringparameter name="anID" querystringfield="empid" defaultvalue="-1" />
          </selectparameters>
        </asp:objectdatasource>

这个问题的提出,是我想在Gridview中整理添加记录的功能。
如果有数据的时候,我们可以把空的newTextBox放在FooterTemplate中,在程序里可以用
Gridview1.FooterRow.FindControl("newTextBox")来取得这个控件,完成添加记录的功能。
但如果数据表中没有记录,header和footer都不会显示出来。 这时,只会显示EmptyDataTemplate里的内容。
奇怪的是EmptyDataRow并不是Gridview的成员,于是上面的方法不行了。
找了很久,找到这样一个变通的办法来获得EmptyDataTemplate里的控件:

Dim txbNew As TextBox = GridView1.Controls(0).Controls(0).FindControl("newTextBox")

很变态,但确实可行。

其中的txbNewCltName和btnAddNew都是放在EmptyTemplate里的控件。
显示的结果是:
ChildTable EmptyDataRow 新添加的内容

可以知道,第一层Control是Table,第二层Control是Row.