开发者

How to get a c# variable (string) value in the .aspx page

So with this code.

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

        public string feedbackPostback = "false";

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

How to I access feebackPostback from:

<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',                          //opti开发者_开发技巧ons: '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>

Currently trying <%= this.feebackPostback %> and returns this error: CS1061: 'ASP.site_master' does not contain a definition for 'feebackPostback' and no extension method 'feebackPostback' accepting a first argument of type 'ASP.site_master' could be found (are you missing a using directive or an assembly reference?)


You misspelled feedbackPostback—you forgot the d.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜