使用更新面板VB [英] Use of Update Panel VB

查看:78
本文介绍了使用更新面板VB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用下面给出的html代码中的更新"面板.请帮助我

I want to use Update panel in the html code given below.Please help me

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="EmailTesting.aspx.vb" Inherits="EmailTesting" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
    <form id="form1" runat="server">
    <div>
             <table class="style1">
                    <tr>
                        <td class="style2">
                            Enter Your Email</td>
                        <td>
                            <asp:TextBox ID="txtEmail_1" runat="server" style="margin-left: 0px"

                                Width="526px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:TextBox ID="txtpass" runat="server"</td>
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="Button" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:Button ID="Button2" runat="server" Text="Cancel" /></td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style2">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
    </div>
    </form>
</body>
</html>



[edit]已添加代码块,将我的内容视为纯文本..."选项已禁用,C#已从描述中删除-OriginalGriff [/edit]



[edit]Code block added, "Treat my content as plain text..." option disabled, C# removed from description - OriginalGriff[/edit]

推荐答案

您好,这是下面的代码:
注意:
1.确保在表单标签内添加ScriptManager.
2.您要更新的任何内容都放在< updatepanel>< contenttemplate>
内 3.此更新面板中使用的按钮将导致自动回发


Hi, here is the code below:
Note:
1. be sure to add ScriptManager inside form tag.
2. whatever content you want to update put inside <updatepanel><contenttemplate>
3. buttons used inside this updatepanel will cause automatic postback


<asp:ScriptManager ID="ScriptManager1" runat="server">
      </asp:ScriptManager>


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
          <ContentTemplate>

      <div>
                  <table class="style1">
                              <tr>
                                    <td class="style2">
                                          Enter Your Email</td>
                                    <td>
                                          <asp:textbox id="txtEmail_1" runat="server" style="margin-left: 0px" xmlns:asp="#unknown">
                                                Width="526px"></asp:textbox>
                                    </td>
                              </tr>
                              <tr>
                                    <td class="style2">
                                          <asp:textbox id="txtpass" runat="server" xmlns:asp="#unknown"></asp:textbox></td>
                                    <td>
                                          <asp:button id="Button1" runat="server" text="Button" xmlns:asp="#unknown" />
                                    </td>
                              </tr>
                              <tr>
                                    <td class="style2">
                                          <asp:button id="Button2" runat="server" text="Cancel" xmlns:asp="#unknown" /></td>
                                    <td>
                                           </td>
                              </tr>
                              <tr>
                                    <td class="style2">
                                           </td>
                                    <td>
                                           </td>
                              </tr>
                        </table>
      </div>
      </ContentTemplate>

          </asp:UpdatePanel>








是的您可以使用具有触发器属性的多个更新面板,但是为什么要使用多个...
Yes You can use multiple update panel , with trigger property, but why do you want to use multiple ...


use update panel 
<asp:updatepanel runat="server" id="upId" xmlns:asp="#unknown">
<contenttemplate>
//put the code here 
</contenttemplate>
<asp:updatepanel></asp:updatepanel></asp:updatepanel>


这篇关于使用更新面板VB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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