当前位置:编程学习 > C#/ASP.NET >>

代码没错,运行后,功能有时行有时不行.


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="userlist.aspx.cs" Inherits="userlist" %>
<%@ Register assembly="Infragistics2.WebUI.UltraWebToolbar.v7.2, Version=7.2.20072.61, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebToolbar" tagprefix="igtbar" %>
<%@ Register assembly="Infragistics2.WebUI.UltraWebGrid.v7.2, Version=7.2.20072.61, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebGrid" tagprefix="igtbl" %>
<%@ Register Assembly="Infragistics2.WebUI.Misc.v7.2, Version=7.2.20072.61, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Front Desk System -- User Setting</title>
    <link href="../CSS/Style.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/jscript">
    function OnClick (oToolBar, oItem, oEvennt) {
        switch(oItem.Key)
        {
            case "AddUser":
                AddUser();
                break;
            case "Home":
                window.parent.location = "../Navigation/Navigation.aspx";
                break;
        }
    }
    
    function AddUser()
    {
        window.location="user.aspx";
    }
    </script>
</head>
<body bottommargin="0" leftmargin="0" rightmargin="0" topmargin="0">
    <form id="form1" runat="server">
        <input type="hidden" id="HiddenSelectedUser" value='-1' />
        <table width="100%" cellspacing="0" cellpadding="0" border="0"> 
                <tr>
                    <td>
                    <igtbar:UltraWebToolbar ID="UltraWebToolbar1" runat='server' BackColor="#D0DAE3" 
                            BackgroundImage="none" BorderColor="#E0E0E4" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Names="Arial" Font-Size="8pt" ForeColor="Black"
                 Height="20px" ImageDirectory="/ig_common/images/" ItemSpacing="0" 
                            ItemWidthDefault="80px" Movable="false" 
                            onbuttonclicked="UltraWebToolbar1_ButtonClicked" >
                    <HoverStyle BackColor="#D8D8E0" BorderColor="#777788" BorderStyle="Solid"
                  BorderWidth="1px" Cursor="Default" Font-Names="Arial" Font-Size="8pt" ForeColor="Black">    
                 </HoverStyle>
                 <ClientSideEvents Click="OnClick"></ClientSideEvents>
                 <Items>
                    <igtbar:TBarButton Images-DefaultImage-Url="../Images/exit.gif" Key="Home" Tag="Home" Text="Home">
                        <Images>
                        <DefaultImage Url="../Images/exit.gif"></DefaultImage>
                        </Images>
                   </igtbar:TBarButton>
                   <igtbar:TBarButton Images-DefaultImage-Url="../Images/exit.gif" Key="AddUser" Tag="AddUser" Text="AddUser">
                        <Images>
                        <DefaultImage Url="../Images/exit.gif"></DefaultImage>
                        </Images>
                   </igtbar:TBarButton>
                 </Items>
                  <DefaultStyle BorderColor="#888888" BorderStyle="None" BorderWidth="0px"
                   Font-Names="Arial" Font-Size="9pt" ForeColor="Black">
                 </DefaultStyle>
                 <SelectedStyle BorderColor="#9999AA" BackColor="#F0F0F4" BorderStyle="Solid"
                  BorderWidth="1px" Cursor="Default" Font-Names="Arial" Font-Size="9pt" ForeColor="Black">
                 </SelectedStyle>
               </igtbar:UltraWebToolbar>
                    </td> 
                 </tr>
    </table> 


不明白为什么我点AddUser的时候,总是要点N次才能打开user.aspx...难道我的javascript写错了 --------------------编程问答-------------------- userlist.aspx和user.aspx是在同一目录下面. --------------------编程问答-------------------- 叫前台执行 有时候是这样· 好像要设个时间吧·但是也会出现LZ这情况
  最好是写在后台 --------------------编程问答-------------------- alert(oItem.Key);
看看到底输出的是什么啊 --------------------编程问答--------------------
引用 3 楼 lovely_baby 的回复:
alert(oItem.Key);
看看到底输出的是什么啊


请问怎么用? --------------------编程问答-------------------- <cc1:WebToolBar id="WebToolBar1" runat="server" Width="40%">
<HoverStyle CssClass="toolhover"></HoverStyle>
<ClientSideEvents Click="OnClick"></ClientSideEvents>
<SelectedStyle CssClass="toolSelected"></SelectedStyle>
<DefaultStyle Cursor="Hand" CssClass="toolDefault"></DefaultStyle>
</cc1:WebToolBar>

<cc1:WebTab id="WebTab1" runat="server" Width="100%" height="100%">
<DisabledTabStyle CssClass="tabDisableTab"></DisabledTabStyle>
<DefaultTabStyle CssClass="tabDefaultTab"></DefaultTabStyle>
<ClientSideEvents AfterSelectedTabChange="HFWebTab1_AfterSelectedTabChange"></ClientSideEvents>
<HoverTabStyle CssClass="tabHoverTab"></HoverTabStyle>
<RoundedImage LeftSideWidth="10" RightSideWidth="10" SelectedImage="ig_tab_blueb1.gif" NormalImage="ig_tab_blueb2.gif"
FillStyle="RightMergedWithCenter"></RoundedImage>
<DefaultTabSeparatorStyle CssClass="tabDefaultTabSeparator"></DefaultTabSeparatorStyle>
<SelectedTabStyle CssClass="tabSelectedTab"></SelectedTabStyle>
</cc1:WebTab>


function OnClick (oToolBar, oItem, oEvent) 
{
var strKey=oItem.Key;
switch(strKey)
{}
} --------------------编程问答--------------------
引用 5 楼 wuyq11 的回复:
<cc1:WebToolBar id="WebToolBar1" runat="server" Width="40%">
<HoverStyle CssClass="toolhover"> </HoverStyle>
<ClientSideEvents Click="OnClick"> </ClientSideEvents>
<SelectedStyle CssClass="toolSelected"> </SelectedStyle>
<DefaultStyle Cursor="Hand" CssClass="toolDefault"> </DefaultStyle>
</cc1:WebToolBar>

<cc1:WebTab id="WebTab1" runat="server" Width="100%" height="100%">
<DisabledTabStyle CssClass="tabDisableTab"> </DisabledTabStyle>
<DefaultTabStyle CssClass="tabDefaultTab"> </DefaultTabStyle>
<ClientSideEvents AfterSelectedTabChange="HFWebTab1_AfterSelectedTabChange"> </ClientSideEvents>
<HoverTabStyle CssClass="tabHoverTab"> </HoverTabStyle>
<RoundedImage LeftSideWidth="10" RightSideWidth="10" SelectedImage="ig_tab_blueb1.gif" NormalImage="ig_tab_blueb2.gif"
FillStyle="RightMergedWithCenter"> </RoundedImage>
<DefaultTabSeparatorStyle CssClass="tabDefaultTabSeparator"> </DefaultTabSeparatorStyle>
<SelectedTabStyle CssClass="tabSelectedTab"> </SelectedTabStyle>
</cc1:WebTab>


function OnClick (oToolBar, oItem, oEvent)
{
var strKey=oItem.Key;
switch(strKey)
{}
}


用这种写法也一样.要点两三次才能打开
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,