asp.net上的onclick事件无法正常工作

时间:2017-01-25 19:50:40

标签: javascript asp.net c#-4.0

#include "p18F4520.inc"

    CONFIG OSC = HS
    CONFIG PWRT = OFF
    CONFIG WDT = OFF
    CONFIG PBADEN = OFF
    CONFIG LVP = OFF
;------------------------------------------------------------------------------
    org 0x000000
MAIN    CLRF    TRISD           ; make D output   
        CLRF    PORTB           ; make all row off
        BCF     TRISA,RA1       ; make port A output
        BSF     PORTA,RA1       ; turn on lights
        SETF    TRISB           ; set B to input



    VAR_A       EQU     0x000   ; access ram address 000 named as Var_A
    VAR_B       EQU     0x001   ; access ram address 001 named as Var_B
    VAR_C       EQU     0x002   ; access ram address 002 named as Var_C

        MOVLW   B'00000001'     ; init 1 LED
        MOVWF   VAR_A           ; move it into Var_A

LOOP        
        BTFSS   PORTB,RB5       ; check bit at RB5,skip next intruction if 1
        CALL    COMPARE         ; check RB5 and RB0
        BTFSS   PORTB,RB5       ; check bit at RB5,skip next intruction if 1
        CALL    ROTATE_RIGHT    ; rotate right
        BTFSS   PORTB,RB0       ; check bit at RB0,skip next intruction if 1
        CALL    ROTATE_LEFT     ; rotate left
        GOTO    LOOP        

;------------------------------------------------------------------------------
ROTATE_RIGHT    
        MOVF    VAR_A,W     ; move content in Var_A to Wreg
        MOVWF   PORTD       ; move to LED
        RRNCF   VAR_A       ; rotate right 0000001-1000000-01000000
        CALL    WAIT        ; delay
        return
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
ROTATE_LEFT 
        MOVF    VAR_A,W     ; move content in Var_A to Wreg
        MOVWF   PORTD       ; move to LED
        RLNCF   VAR_A       ; rotate left 0000001-00000010-0000100
        CALL    WAIT        ; delay
        return
;------------------------------------------------------------------------------

;------------------------------------------------------------------------------
WAIT    movlw   0xff        ; init 255 
        movwf   VAR_B       ; Var_B = 255
LOOP2   movlw   0xff        ; init 255
        movwf   VAR_C       ; Var_C 255
LOOP1   decfsz  VAR_C       ; decrement Var_C by 1
        goto    LOOP1       ; 
        decfsz  VAR_B       ; decrement Var_B by 1
        goto    LOOP2       ;
        return          
;------------------------------------------------------------------------------


;------------------------------------------------------------------------------

COMPARE BTFSS   PORTB,RB0
        GOTO    COMPARE
        return

;------------------------------------------------------------------------------    
        end

1 个答案:

答案 0 :(得分:0)

您需要删除href="#MainContent_tabs1"href不是LinkButton的有效属性。它会干扰PostBack。

<asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="alert('Your changes will be saved.');" OnClick="LinkButton1_Click">General Info</asp:LinkButton>