在我的应用程序中,我具有搜索顺序"的搜索"按钮.当我输入订单号和订单类型并单击提交按钮时,它将显示该订单号的文档.但是,应用程序的问题是当我同时单击搜索"按钮时它会复制数据.我想避免复制单击多个按钮上的数据. 谢谢, 乌梅什·塔亚德
Hi, In my application i have Search button for Search Order. When i enter the Order no and order type and click submit button then it shows the documents for that order no.But,The Problem with the application is when i click the Search button simultaneously it replicates the data.I want to avoid the replication of the data on multiple button click. Thanks, Umesh Tayade
<Button Content="Search" Margin="5,0,0,0" Height="21" Width="100" Grid.Row="0" Grid.Column="9" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource grayButton}" x:Name="btnSearch" Click="btnSearch_Click"/>
private void btnSearch_Click(object sender, RoutedEventArgs e) { if (IsValid() && isLineValid) { if (null != multiDocViewModelConnector.ViewState && multiDocViewModelConnector.ViewState.FilterDescripter != null) multiDocViewModelConnector.ViewState.FilterDescripter.Clear(); __searchCriteria(); } }
推荐答案
尝试一下 Try this <asp:Button runat="server" ID="BtnSubmit" OnClientClick="this.disabled = true; this.value = 'Submitting...';" UseSubmitBehavior="false" OnClick="BtnSubmit_Click" Text="Click Me Once!" />
干杯, Balaji
Cheers, Balaji
这里是一个简单的解决方案...试试吧.. ->内部btnSearch_Click事件提及 Here is one Simple Solution... Just Try It.. --> Inside btnSearch_Click Event Mention btnSearch.Enabled = false
->再使用一个按钮清除" ->和btnClear_Click事件提及内
--> Use One more Button "Clear" --> And Inside btnClear_Click Event Mention
btnSearch.Enabled = true
使用常规的HTML按钮,包括Runat ="server"和"OnServerClick"事件名称-像这样: Use a regular HTML button, including a Runat="server" and an ''OnServerClick'' event designation - like this: <INPUT id="Button1" onclick="document.form1.Button1.disabled=true;" type="button" value="Submit - Insert Data" name="Button1" runat="server" onserverclick="doInsert">
然后,在"doInsert"子例程的最后一行中,添加此行
Then, in the very last line of the ''doInsert'' subroutine, add this line
Button1.enabled="True".
更多推荐
避免多次单击按钮
发布评论