| | |
problem, two asp buttons are working as one, don't want that
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 1
Reputation:
Solved Threads: 0
I've got one form in a masterpage en here i've got one asp:button with a submit function that sends data to my mail for now. And then I made a contactform in a contentpage with a asp:button.Herefore is a second submitbutton. All code behind vb.net(the function)
Problem: when i click on the submitbutton of my contactform, the submitbutton from my masterpage will respond as well. They work as one. I don't want that. They must have there own function. How can i solve this? When I click one of them, the button must only do the things, the validations, it must do for that part. This is my masterpage aspx:
here my contactform aspx:
the code for my submitbutton is written in code behind, like this:
Protected Sub btnSubmit2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit2.Click
'... code
end Sub
PLEASE HELP ME OUT OF THIS
Problem: when i click on the submitbutton of my contactform, the submitbutton from my masterpage will respond as well. They work as one. I don't want that. They must have there own function. How can i solve this? When I click one of them, the button must only do the things, the validations, it must do for that part. This is my masterpage aspx:
VB.NET Syntax (Toggle Plain Text)
<asp:Panel ID="Panel1" runat="server" Width="100%" DefaultButton="btnSubmit"> <div id="main"> <form runat="server" defaultbutton="btnSubmit"> <table> <tr> <td align="left" valign="top"> <div id="leftContainer"> <div id="newsLetter"><span class="kopLeftMenu">NIEUWSBRIEF</span> <div id="mainMailing"> <asp:TextBox ID="tbMailing" runat="server" Text="<enter email-address here...>" Width="200px"/> <asp:Label id="labelSucces" runat="server" Visible="false" /> <asp:ValidationSummary ID="valsumMail" runat="server" DisplayMode="SingleParagraph" /></span> </div> <div style="float:right; margin-right: 15px; padding-top: 6px;"> <asp:Button ID="btnSubmit" runat="server" Text="Verzenden" TabIndex="1"/></div> </td> <td align="left" valign="top"> <div> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </td> </tr> </table>
here my contactform aspx:
•
•
•
•
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server" DefaultButton="btnSubmit2">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<aspanel ID="Panel1" runat="server" Width="100%" DefaultButton="btnSubmit2">
<div id="inhoud">
<table>
<tr>
<td>
<div>
<div></div>
<div style="padding-top: 3px;"><asp:Label AssociatedControlID="name" runat="server">Naam</asp:Label></div>
<div style="padding-top: 12px;"><asp:Label AssociatedControlID="email" runat="server">E-mailadres</asp:Label></div>
<div style="padding-top: 67px;"><asp:Label AssociatedControlID="description" runat="server">Boodschap</asp:Label></div>
</div>
</td>
<td>
<div>
<asp:RadioButtonList ID="tbTitleDhrMevr" runat="server" RepeatDirection="Horizontal">
<asp:ListItem>Dhr.</asp:ListItem>
<asp:ListItem>Mevr.</asp:ListItem>
</asp:RadioButtonList>
</div>
<div>
<asp:TextBox id="name" runat="server" />
</div>
<div style="padding-top: 1px;">
<asp:TextBox id="email" runat="server" />
</div>
<div style="padding-top: 1px;">
<asp:TextBox id="description" runat="server" Height="100px" Width="250px" TextMode="MultiLine" />
</div>
</td>
</tr>
</table>
<div style="float:right;"><asp:Button ID="btnSubmit2" runat="server" Text="Verzenden" TabIndex="2" /></div>
<div><asp:Label id="labelSucces" runat="server" Visible="false"></asp:Label></div>
<div><span><asp:ValidationSummary ID="valsumName" runat="server" DisplayMode="BulletList" /></span></div>
Protected Sub btnSubmit2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit2.Click
'... code
end Sub
PLEASE HELP ME OUT OF THIS
![]() |
Similar Threads
- Problem in asp.net server? (ASP.NET)
- ASP.NET - session objects Problem (ASP.NET)
- VML Buttons are not working (HTML and CSS)
- Problem with ASP.Net control or JavaScript ??? (ASP.NET)
- 'Quick reply' and 'Go advanced' buttons no longer working on Opera.. (DaniWeb Community Feedback)
- ASP and JavaScript working together (ASP)
- xfire prevents mouse buttons working (USB Devices and other Peripherals)
Other Threads in the VB.NET Forum
- Previous Thread: validating data in vb.net
- Next Thread: About VB.Net ?
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year



anel ID="Panel1" runat="server" Width="100%" DefaultButton="btnSubmit2">

