Răspuns XBAP and HtmlTextWriter

  • 13 martie 2012 21:31
     
     

    I am trying to use HtmlTextWriter with a publishable XBAP application. When I try to add a reference to System.Web, its not shown as a possible choice.

    In my similar windows application I referenced System.Web with a using System.Web.UI.

    What is the proper reference for using  HtmlTextWriter in an publishable XBAP application?

    Thanks

Toate mesajele

  • 14 martie 2012 04:17
     
     

    Hi,

    Check below HtmlTextWriter Sample

    http://www.dotnetperls.com/htmltextwriter-vbnet

    Regards

    Sneha

  • 14 martie 2012 18:23
     
      Are cod

    Thanks, but this does not answer the question. The problem is that

    Imports System.Web.UI

    is not accessible from an XBAP project because I cannot reference System.Web. I am looking for the proper reference so that I can use HTMLTextWriter in an XBAP project.

  • 15 martie 2012 06:21
    Moderator
     
     Răspuns Are cod

    System.Web.UI is .Net framework 4.0, not for .Net framework 4 client profile. according my test, when I created a 4.0 XBAP project, I can add the System.Web as reference. If I use the 4 client profile, I can'f find the reference in the add references window.

    So what's your framework version? If it is client profile, please try to change it as 4. After you changed, there may be some class or namespace conflict, we need use the full namespace to avoid this issue happen. Something like below:

     public partial class Page1 : System.Windows.Controls.Page

    Hope it helps.


    Best Regards,
    Rocky Yue[MSFT]
    MSDN Community Support | Feedback to us