如何从数据库中获取gridview的moalpopup上的数据 [英] how to fetch data on moalpopup of gridview from database

查看:69
本文介绍了如何从数据库中获取gridview的moalpopup上的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在modalpopup上的文本框中获取数据,这是从数据库点击grodview imagebutton ....



//代码



I want to fetch data in textbox on modalpopup which is on click of grodview imagebutton from database....

//code

<asp:GridView ID="GrdATMyPuchase1" AutoGenerateColumns="false" runat="server"  >

                <Columns>
<pre lang="xml">&lt;asp:TemplateField HeaderText=&quot;Buyer Details&quot;&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Image ID=&quot;ImgATbuyer&quot; ImageUrl=&quot;../Images/buyer.gif&quot;  runat=&quot;server&quot; Width=&quot;20px&quot; Height=&quot;20px&quot; /&gt;

                  &lt;cc1:ModalPopupExtender ID=&quot;ModalPopupExtender1&quot; TargetControlID=&quot;ImgATbuyer&quot; PopupControlID=&quot;Panel3&quot; CancelControlID=&quot;&quot; runat=&quot;server&quot;&gt;
                  &lt;/cc1:ModalPopupExtender&gt;

                  &lt;asp:Panel ID=&quot;Panel3&quot; runat=&quot;server&quot;&gt;
                      &lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; Text=&quot;Label&quot;&gt;&lt;/asp:Label&gt;
                      &lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;
                  &lt;/asp:Panel&gt;
              &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;</pre>

推荐答案

您将数据传输到数据库就像,

a简单文字框,

文字框莫代尔pop没有任何特殊属性,





textbox1.tex = ob1.ds.Tables [0] .Rows [0] [process_id]。ToString();
you take data to data base just like,
a simple text box,
text box in modal pop not have any special property,
Like

textbox1.tex = ob1.ds.Tables[0].Rows[0]["process_id"].ToString();


这篇关于如何从数据库中获取gridview的moalpopup上的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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