Search

You searched for the word(s): userid:825776

Matching Posts

  • ASP.NET pages inside unit tests - AppDomainUnloadedException

    Hello, I am experiencing a difficulty with running ASPX pages outside of IIS and even outside of HttpRuntime. These practices are not well documented, but I hope someone has already solved similar problem. My goal is simple: Somehow create an instance of an ASPX page, run it and test what happens. Test values of some page's properties, properties of its controls and so on. Here's where I came: Create a new application domain (ApplicationHost.CreateApplicationHost). Compile the page and get
    Posted to Installation and Setup (Forum) by LLook on 11/18/2008
  • Re: How to avoid adding the form tag with server controls?

    Yes, I see. I just hoped that there is something like a design time attribute for this, but it isn't. I found that the requirement of the form is made by calling the Page.VerifyRenderingInServerForm(control) method. This method is called only from some form controls (Button, DropDownLis, FileUpload, CheckBox, ImageButton, LinkButton, ListBox, Login, LoginStatus, TextBox), and of course controls that are compound of these. There is a lot of built-in controls, that don't need a form, for example
    Posted to Visual Web Developer 2008 Express (Forum) by LLook on 10/25/2008
  • Re: How to avoid adding the form tag with server controls?

    From now I am cosidering this as a Visual Studio weakness and I have to deal with it. Possibilities are these: 1) I can stop using Design View. 2) I can always delete the tag manually. 3) I can use some sort of pre/post-processing. 4) I can define a control adapter for the System.Web.UI.HtmlControls.HtmlForm. One worse than the other...
    Posted to Visual Web Developer 2008 Express (Forum) by LLook on 10/24/2008
  • Re: How to avoid adding the form tag with server controls?

    Not the whole system, only most of built-in controls. The form is needed only if you're using the ViewState/ControlState and postback. Example of a simple control that doesn't need the form: using System; using System.Web; using System.Web.UI; namespace WebSite3 { [ToolboxData( "<{0}:HelloWorld runat=\" server\ " />" )] public class HelloWorld : Control { protected override void Render(HtmlTextWriter writer) { writer.Write( "Hello World" ); } } } <%
    Posted to Visual Web Developer 2008 Express (Forum) by LLook on 10/19/2008
  • How to avoid adding the form tag with server controls?

    Hello, I've got this problem: In design mode, when I drag any server control into a page from the toolbar, and that page doesn't contain any server form tag, then the designer creates one. Even if it's not necessary (some controls don't use postback). Is there any possibility to avoid this behavior, at least for my own controls? Some attribute that I didn't find?
    Posted to Visual Web Developer 2008 Express (Forum) by LLook on 10/19/2008
    Filed under: toolbar, contols, design view, .ASCX, .ASPX, server form, attributes
Page 1 of 1 (5 items)