2011-04-29 7 views
0

그래서이 코드를 사용하십시오. 현재 <%= this.feebackPostback %>을 시도.aspx 페이지에서 C# 변수 (문자열) 값을 얻는 방법

<script type="text/javascript"> 
    $(function() { 
     $('.slide-out-div').tabSlideOut({ 
      tabHandle: '.handle',      //class of the element that will become your tab 
      pathToTabImage: 'images/feedback.gif', //path to the image for the tab //Optionally can be set using css 
      imageHeight: '122px',      //height of tab image   //Optionally can be set using css 
      imageWidth: '40px',      //width of tab image   //Optionally can be set using css 
      tabLocation: 'right',      //side of screen where tab lives, top, right, bottom, or left 
      speed: 300,        //speed of animation 
      action: 'click',       //options: 'click' or 'hover', action to trigger animation 
      topPos: '150px',       //position from the top/ use if tabLocation is left or right 
      leftPos: '20px',       //position from left/ use if tabLocation is bottom or top 
      fixedPosition: false,      //options: true makes it stick(fixed position) on scroll 
      onLoadSlideOut: <%= this.feebackPostback %> 
     }); 

    }); 
</script> 

이 오류를 반환 :

public partial class SiteMaster : System.Web.UI.MasterPage 
    { 

     public string feedbackPostback = "false"; 

     protected void Page_Load(object sender, EventArgs e) 
     { 

     } 
    } 
} 

어떻게에서 feebackPostback에 액세스 할 수 CS1061 : 'ASP.site_master는'feebackPostback '없이 확장 방법'에 대한 정의가 포함되어 있지 않습니다 'ASP.site_master'유형의 첫 번째 인수를 수락하는 'feebackPostback'을 찾을 수 있습니다 (사용 지시문이나 어셈블리 참조가 누락 되었습니까?)

+4

하나에 대한 선언과 사용법은 철자가 다릅니다. –

답변

5

맞춤법 오류 feedbackPostback-을 잊어 버린 경우 d.

관련 문제