本文介绍了当我设置Navigateurl Menuitem单击事件未触发时,当我删除导航URL然后它被解雇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
C#代码
C# code
protected void Menu1_MenuItemClick1(object sender, MenuEventArgs e)
{
if (txtPolicyNumber.Text.Length == 9)
{
HtmlElementCollection elc = this.ieBrowser.Document.GetElementsByTagName("input");
if (Menu1.SelectedValue == "Policy Status")
{
txtCaptcha.Text = "";
DoccumentComplete = false;
navigate("https://merchant.onlinelic.in/LICMerchant/appmanager/Merchant/MerchantHome?_nfpb=true&_windowLabel=Queries_Nav_Instance&_cuid=RC_t_888040&_pagechange=MerchantViewPolicyStatus&_pageLabel=merchantHomePage");
//foreach (HtmlElement el in elc)
//{
// if (el.GetAttribute("href").Equals("https://merchant.onlinelic.in/LICMerchant/appmanager/Merchant/MerchantHome?_nfpb=true&_windowLabel=Queries_Nav_Instance&_cuid=RC_t_888040&_pagechange=MerchantViewPolicyStatus&_pageLabel=merchantHomePage"))
// {
// DoccumentComplete = false;
// el.InvokeMember("Click");
// lblMessage.Text = "Policy Status View";
// }
//}
// bool Status = WebPageValidation();
LoadCaptcha();
}
网页代码
Web page code
<asp:Menu runat="server" ID="Menu1" CssClass="auto-style2" BackColor="#F7F6F3" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#7C6F57" StaticSubMenuIndent="10px" style="font-size: medium" OnMenuItemClick="Menu1_MenuItemClick1">
<DynamicHoverStyle BackColor="#7C6F57" ForeColor="White" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicMenuStyle BackColor="#F7F6F3" />
<DynamicSelectedStyle BackColor="#5D7B9D" />
<Items>
<asp:MenuItem NavigateUrl="~/PolicyStatus.aspx" Text="PolicyStatus"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/LoanEligibility.aspx" Text="Loan Eligible" Value="Loan Eligible"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/SurrenderValue.aspx" Text="Surrender Value" Value="Surrender Value"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/SurrenderValue.aspx" Text="Revival Quotation" Value="Revival Quotation"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/AccuredBonus.aspx" Text="Accured Bonus" Value="Accured Bonus"></asp:MenuItem>
</Items>
<StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<StaticSelectedStyle BackColor="#5D7B9D" />
</asp:Menu>
推荐答案
这篇关于当我设置Navigateurl Menuitem单击事件未触发时,当我删除导航URL然后它被解雇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!