質問

したがって、このコードで。

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

        public string feedbackPostback = "false";

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

アクセス方法 feebackPostback から:

<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>

現在試しています <%= this.feebackPostback %> このエラーを返します:CS1061: 'ASP.SITE_MASTER'には「FEEBACKPOSTBACK」の定義が含まれておらず、「asp.site_master」の最初の引数を受け入れる「extensionメソッド」feebackpostback 'feebackpostback'が見つかる可能性があります(ディレクティブを使用しているか、使用するか、アセンブリリファレンス?)

役に立ちましたか?

解決

あなたは間違っていました feedbackPostback- あなたはを忘れました d.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top