自定义的可视化Web部件属性的SharePoint [英] Custom visual web part properties sharepoint

查看:217
本文介绍了自定义的可视化Web部件属性的SharePoint的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法建立在Visual Studio 2012的可视化Web部件属性..
我为参照,以 http://msdn.microsoft.com/en-us/library /ee231551.aspx ,但没有成功。

I'm having trouble creating visual web part properties in visual studio 2012.. I was refered to http://msdn.microsoft.com/en-us/library/ee231551.aspx, but then was unsuccessful..

看着Web部件,发现的.ascx,ascx.cs和ascx.g.cs

looked in the Web part and found the .ascx, ascx.cs and the ascx.g.cs

我一直试图找到webpart.cs文件,但我不能。有没有一种方法可以让我创建它也许我期待在错误的地方。

I've been trying to find the webpart.cs file but then I cant. Is there a way I can create it or maybe I'm looking in the wrong place..

推荐答案

有没有web部件的.cs在2012年VS创建可视化Web部件文件可以添加Web部件属性以ascx.cs文件例如

There is no webpart .cs files in Visual Web Part created in VS 2012. You can add Web Part properties to ascx.cs files e.g.

     [WebBrowsable(true),
     WebDisplayName("Page Title"),
     WebDescription("Title displayed on the page"),
     Category("Test Properties"),
     Personalizable(PersonalizationScope.Shared)]
    public string PageTitle
    {
        get
        {
            return _pageTitle;
        }
        set
        {
            _pageTitle = value;
        }
    }

这篇关于自定义的可视化Web部件属性的SharePoint的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆