这是守则,我会在帖子的最后解释它
<div class="container">
<br />
<div id="infoCli" class="well" style="height: auto; width: auto;">
<table>
<tr>
<td>
<asp:Label runat="server" AssociatedControlID="cdCli" Enabled="False">Código</asp:Label>
<br />
<asp:TextBox runat="server" ID="cdCli" Width="40px" ReadOnly="True" />
</td>
<td class="auto-style39">
<asp:Label runat="server" AssociatedControlID="nmFantasia">Nome Fantasia</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmFantasia" ControlToValidate="nmFantasia" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmFantasia" Width="368px" MaxLength="30" TabIndex="1" />
</td>
<td>
<asp:Label runat="server" AssociatedControlID="nmCli">Razão Social</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCli" ControlToValidate="nmCli" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmCli" Width="589px" TabIndex="2" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style42">
<asp:Label runat="server" AssociatedControlID="tpCli">Tipo de Cliente</asp:Label>
<br />
<asp:DropDownList ID="tpCli" runat="server" Height="25px" Width="145px" TabIndex="3" Enabled="False">
<asp:ListItem Value="0">Somente Consulta</asp:ListItem>
<asp:ListItem Value="1">Eventual</asp:ListItem>
<asp:ListItem Value="2">C/ Contrato</asp:ListItem>
</asp:DropDownList>
</td>
<td class="auto-style54">
<asp:Label runat="server" AssociatedControlID="nrCGC">CNPJ</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrCGC" Width="138px" TabIndex="4" />
</td>
<td class="auto-style69">
<asp:Label runat="server" AssociatedControlID="nrCPF">CPF</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrCPF" Width="110px" TabIndex="5" />
</td>
<td class="auto-style43">
<asp:Label runat="server" AssociatedControlID="nrCGF">CGF</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCGF" ControlToValidate="nrCGF" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrCGF" Width="134px" TabIndex="6" />
</td>
<td class="auto-style32">
<asp:Label runat="server" AssociatedControlID="CheckBox1" TabIndex="7">Isento
<br />
<asp:CheckBox ID="CheckBox1" runat="server" />
</asp:Label>
</td>
<td class="auto-style56">
<asp:Label runat="server" AssociatedControlID="inscMun">Insc. Mun</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvInscMun" ControlToValidate="inscMun" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="inscMun" Width="106px" TabIndex="8" />
</td>
<td class="auto-style55">
<asp:Label runat="server" AssociatedControlID="nrCEI">CEI</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCEI" ControlToValidate="nrCEI" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrCEI" Width="133px" TabIndex="9" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style66">
<asp:Label runat="server" AssociatedControlID="nrCep">CEP</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNmCep" ControlToValidate="nrCep" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ToolTip="A Consulta ao CEP só será realizada caso esteja conectado à internet" ID="nrCep" onblur="Javascript:atualizacep(this.value)" Width="98px" TabIndex="10" data-mask="99999-999" />
</td>
<td>
<asp:Label runat="server" AssociatedControlID="dsEnder">Endereço</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvDsEnder" ControlToValidate="dsEnder" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsEnder" Width="377px" TabIndex="11" />
</td>
<td class="auto-style46">
<asp:Label runat="server" AssociatedControlID="nrEnder">Número</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNrEnder" ControlToValidate="nrEnder" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrEnder" Width="46px" TabIndex="12" />
</td>
<td class="auto-style68">
<asp:Label runat="server" AssociatedControlID="dsBairro">Bairro</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvDsBairro" ControlToValidate="dsBairro" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsBairro" Width="196px" TabIndex="13" />
</td>
<td class="auto-style25">
<asp:Label runat="server" AssociatedControlID="compEnder">Complemento</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvCompEnder" ControlToValidate="compEnder" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="compEnder" Width="141px" TabIndex="14" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style43">
<asp:Label runat="server" AssociatedControlID="dsCid">Cidade</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvDsCid" ControlToValidate="dsCid" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsCid" Width="414px" TabIndex="15" />
</td>
<td class="auto-style51"> <asp:Label runat="server" AssociatedControlID="cdUF">UF</asp:Label>
<asp:RequiredFieldValidator ID="rfvCdUF" runat="server" ControlToValidate="cdUF" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="cdUF" Width="34px" TabIndex="166" />
</td>
<td class="auto-style48">
<asp:Label runat="server" AssociatedControlID="foCli">Telefone</asp:Label>
<asp:RequiredFieldValidator ID="rfvFoCli" runat="server" ControlToValidate="foCli" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foCli" Width="122px" TabIndex="17" />
</td>
<td class="auto-style19">
<asp:Label runat="server" AssociatedControlID="nrFax">Fax</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvNrFax" ControlToValidate="nrFax" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrFax" Width="126px" TabIndex="18" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style57">
<asp:Label runat="server" AssociatedControlID="cdIBGE" Width="133px">Cód. Cidade IBGE</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvCdIBGE" ControlToValidate="cdIBGE" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="cdIBGE" Width="113px" TabIndex="19" />
</td>
<td class="auto-style52">
<asp:Label runat="server" AssociatedControlID="cdNatOpe" Width="170px">Natureza da Operação</asp:Label>
<asp:RequiredFieldValidator runat="server" ID="rfvCdNatOpe" ControlToValidate="cdNatOpe" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:DropDownList ID="cdNatOpe" runat="server" Height="25px" Width="404px" TabIndex="20">
<asp:ListItem Value="0">(escolha uma opção):</asp:ListItem>
<asp:ListItem Value="1">Tributação No Município</asp:ListItem>
<asp:ListItem Value="2">Tributação Fora do Município</asp:ListItem>
<asp:ListItem Value="3">Isenção</asp:ListItem>
<asp:ListItem Value="4">Imune</asp:ListItem>
<asp:ListItem Value="5">Exigibilidade Suspensa por Decisão Judicial</asp:ListItem>
<asp:ListItem Value="6">Exigibilidade Suspensa por Procedimento Administrativo</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
<div class="container">
<div class="container">
<div class="row">
<div class="checkbox">
<label for="CheckBox2">
<asp:CheckBox ID="CheckBox2" runat="server" TabIndex="22" />
Simples Nacional
</label>
<label for="CheckBox3">
<asp:CheckBox ID="CheckBox3" runat="server" />
Inadiplente
</label>
<label for="CheckBox4">
<asp:CheckBox ID="CheckBox4" runat="server" TabIndex="23" />
Incentivador Cultural
</label>
<label for="CheckBox5">
<asp:CheckBox ID="CheckBox5" runat="server" TabIndex="24" />
Inativo
</label>
</div>
<br />
</div>
</div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6 pull-right">
<asp:Button CssClass="btn btn-default" ID="btnCons" runat="server" Text="Consultar" OnClick="Consultar" CausesValidation="false" />
<asp:Button CssClass="btn btn-default" ID="btnInse" runat="server" Text="Inserir" OnClick="Inserir" CausesValidation="false" />
<asp:LinkButton runat="server" OnClick="Consultar" CausesValidation="false" >Consultar</asp:LinkButton>
</div>
</div>
</div>
<%--DIV - WELL--%>
<br />
<div id="endCob" class="well" style="height: auto; width: auto;">
<div class="checkbox-inline">
<label for="CheckBox7" class="checkbox-inline">
<asp:CheckBox ID="checkEndeCob" OnClick="Javascript:checkEndCob()" runat="server" TabIndex="25" />
Endereço do cliente é o mesmo que o Endereço de Cobrança
</label>
</div>
<table>
<tr>
<td class="auto-style28">
<asp:Label runat="server" AssociatedControlID="nrCepCob">CEP</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrCepCob" onblur="Javascript:atualizacep(this.value)" Width="98px" TabIndex="26" />
</td>
<td class="auto-style29">
<asp:Label runat="server" AssociatedControlID="dsEnderCob">Endereço</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsEnderCob" Width="373px" TabIndex="27" />
</td>
<td class="auto-style40">
<asp:Label runat="server" AssociatedControlID="nrEnderCob">Número</asp:Label>
<br />
<asp:TextBox runat="server" ID="nrEnderCob" Width="38px" TabIndex="28" />
</td>
<td class="auto-style31">
<asp:Label runat="server" AssociatedControlID="dsBairroCob">Bairro</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsBairroCob" Width="179px" TabIndex="29" />
</td>
<td class="auto-style25">
<asp:Label runat="server" AssociatedControlID="compEnderCob">Complemento</asp:Label>
<br />
<asp:TextBox runat="server" ID="compEnderCob" Width="194px" TabIndex="30" />
</td>
</tr>
</table>
<table>
<tr>
<td class="auto-style23">
<asp:Label runat="server" AssociatedControlID="dsCidCob">Cidade</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsCidCob" Width="252px" TabIndex="31" />
</td>
<td class="auto-style27">
<asp:Label runat="server" AssociatedControlID="cdUFCob">UF</asp:Label>
<br />
<asp:TextBox runat="server" ID="cdUFCob" Width="33px" TabIndex="32" />
</td>
<td class="auto-style3">
<asp:Label runat="server" AssociatedControlID="foCliCob">Telefone</asp:Label>
<br />
<asp:TextBox runat="server" ID="foCliCob" Width="108px" TabIndex="33" />
</td>
<td class="auto-style19">
<asp:Label runat="server" AssociatedControlID="nrFaxCob">Fax</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nrFaxCob" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nrFaxCob" Width="113px" TabIndex="34" />
</td>
</tr>
</table>
</div>
<br />
<div id="contatoCli" class="well" style="height: auto; width: auto;">
<table>
<tr>
<td class="auto-style70">
<asp:Label runat="server" AssociatedControlID="nmContat1">Comercial</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat1" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat1" Width="396px" TabIndex="35" />
</td>
<td class="auto-style72">
<asp:Label runat="server" AssociatedControlID="foneCont1">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont1" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont1" Width="122px" TabIndex="36" />
</td>
<td class="auto-style62">
<asp:Label runat="server" AssociatedControlID="dsEmail1" Width="46px">E-Mail</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsEmail1" Width="343px" TabIndex="37" />
</td>
</tr>
<tr>
<td class="auto-style71">
<asp:Label runat="server" AssociatedControlID="nmContat2">Financeiro</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat2" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat2" Width="396px" TabIndex="38" />
</td>
<td class="auto-style73">
<asp:Label runat="server" AssociatedControlID="foneCont2">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont2" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont2" Width="122px" TabIndex="39" />
</td>
<td class="auto-style7">
<asp:Label runat="server" AssociatedControlID="dsEmail2">E-Mail</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="dsEmail2" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsEmail2" Width="343px" TabIndex="40" />
</td>
</tr>
<tr>
<td class="auto-style71">
<asp:Label runat="server" AssociatedControlID="nmContat3">Operacional</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat3" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat3" Width="396px" TabIndex="41" />
</td>
<td class="auto-style73">
<asp:Label runat="server" AssociatedControlID="foneCont3" Width="66px">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont3" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont3" Width="122px" TabIndex="42" />
</td>
<td class="auto-style7">
<asp:Label runat="server" AssociatedControlID="dsEmail3">E-Mail</asp:Label>
<br />
<asp:TextBox runat="server" ID="dsEmail3" Width="343px" TabIndex="43" />
</td>
</tr>
<tr>
<td class="auto-style71">
<asp:Label runat="server" AssociatedControlID="nmContat4">Expedição</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="nmContat4" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="nmContat4" Width="396px" TabIndex="44" />
</td>
<td class="auto-style73">
<asp:Label runat="server" AssociatedControlID="foneCont4">Telefone</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="foneCont4" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="foneCont4" Width="122px" TabIndex="45" />
</td>
<td class="auto-style7">
<asp:Label runat="server" AssociatedControlID="dsEmail4">E-Mail</asp:Label>
<asp:RequiredFieldValidator runat="server" ControlToValidate="dsEmail4" CssClass="field-validation-error" ErrorMessage="*" />
<br />
<asp:TextBox runat="server" ID="dsEmail4" Width="343px" TabIndex="46" />
</td>
</tr>
</table>
</div>
<br />
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnCons" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
所以,这是问题,我有一个MasterPage,它有页面的页眉和页脚,我的子页面只是内容,所以,在这种情况下,这个表单。 当我第一次单击按钮时,它将按计划工作,它将继续数据库检索我的数据并移动到文本框(texbox.Text = value;)。 但是当我更改值时,要进行第二次搜索OnClick_Event它没有被触发,我在方法中有一个断点,所以我可以看到它没有到达那里。 另外,使用FireBug我可以看到,当我第一次单击该按钮时,我得到一个“参考错误:MyMethod未定义”,但它仍然带来我的数据并输入方法。 当我第二次点击它时,我得到相同的参考错误,我得到了一个
“错误:Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。从服务器返回的状态代码为:404”
以及
我是ASP.NET新手,我对JSF有所了解但是,这必须在ASP.NET Webforms上完成
谢谢,
加布里埃尔
答案 0 :(得分:0)
所以,对不起!!哈哈,我没有注意到早些时候,我感到很愚蠢!
在参考错误(JS)中它说/MyPage.aspx/MyMethod,但是,由于某种原因我忘记了MyPage.aspx在一个文件夹中,我仍然不太明白为什么第二次它& #34;忘记&#34;页面目录,但是,我把文件夹放在项目主文件夹中,然后修复了