Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.Unit'

Posted by user203127 on Stack Overflow See other posts from Stack Overflow or by user203127
Published on 2010-05-26T14:16:42Z Indexed on 2010/05/26 14:21 UTC
Read the original article Hit count: 364

Filed under:

hi,

I ma getting error like Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.Unit' in the following code. How to fix this.

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        RadTab tab = new RadTab();
        tab.Text = string.Format("New Page {0}", 1);
        RadTabStrip1.Tabs.Add(tab);

        RadPageView pageView = new RadPageView();
        pageView.Height = "100px";
        RadMultiPage1.PageViews.Add(pageView);

        BuildPageViewContents(pageView, RadTabStrip1.Tabs.Count);
        RadTabStrip1.SelectedIndex = 0;
        RadTabStrip1.DataBind();

    }
}

Here I am getting error. pageView.Height = "100px";

How to fix this?

© Stack Overflow or respective owner

Related posts about .NET