Technical Question: Is it possible to run without viewstate?

Last post 08-03-2006, 9:19 AM by trux. 4 replies.
Sort Posts: Previous Next
  •  07-31-2006, 12:43 PM 21415

    Technical Question: Is it possible to run without viewstate?

    Hello,
     
    I'm running a rather complex dynamic portal without static aspx-pages.
    Nearly everything gets rendered dynamically and on demand. So I'd like to do with your editor control.
     
    I already bought a licence some months ago. After disassembling parts of the .NET-Framework I got it. I had to use a dummy server form (functions as the form runat=server but does not render a form to the client output stream).
     
    well, this hack worked just fine until I migrated to .NET 2.0.
     
    So here my question: is there an easy way to work around viewstates and rendering the control dynamically calling its rendercontrol-method? which control events have to be called before? what else should I recognize?
    All I get now is a nonfunctional editor looking quite the same but with a javascript error saying "CuteEditorClientClass is undefined". I don't understand, since I have a form runat=server wrapper and I call the control's onload events etc. What else did I forget?
     
    Is there some fixes I need since V5.2 for using it with .NET2.0? I just downloaded V5.3.
     
    I'd be happy if you helped me.
     
    kind regard,
    matt
     
  •  08-01-2006, 2:57 PM 21456 in reply to 21415

    Re: Technical Question: Is it possible to run without viewstate?

    matt,
     
    CuteEditor control doesn't use many viewstates. Many viewstates are disabled.
     
    I am not sure what you are trying to.
     
    Can you create simple example and send it to me?
     
    My email address is [email protected].
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  08-01-2006, 5:04 PM 21463 in reply to 21456

    Re: Technical Question: Is it possible to run without viewstate?

    adam,
     
    thanks for your reply.
     
    it's rather difficult to extract the functionality out of my very large project, but I'm looking forward to create a simple example project. this will take me some time.
     
    technically, the procedure is as follows:
    - i have a classlibrary project, not a standard asp.net one built into a bin-directory and run via webserver alias.
    - i have a httphandler (inherits from Page) instead of an aspx-page
    - this handler does not provide viewstate as it does not load any controls that need would need it
    - i render my controls dynamically, so there is no <bla runat=server> but a Page.LoadControl("bla").RenderControl(writer) call.
    - before that, i have to call several control events asp.net would call (onload, onprerender etc.)
     
    anyways, this procedure worked fine for 1.1, but not with 2.0. i suppose something has changed within internal aspnet processing.
     
    i'll have a sample ready in a few hours.
     
    cheers,
    matt
     
  •  08-01-2006, 6:56 PM 21466 in reply to 21456

    Re: Technical Question: Is it possible to run without viewstate?

    I just sent you an email.
     
    thanks a lot for helping me.
     
  •  08-03-2006, 9:19 AM 21510 in reply to 21456

    Re: Technical Question: Is it possible to run without viewstate?

    I got it.
     
    The problem was that cuteeditor refuses to render (either a textbox only or a nonfunctioning editor with javascript errors), when not being put into a server form.
    Nothing can be done to avoid this problem from my position.
    Since my project uses userdefined forms (the classical way without postbacks and viewstates) i did not want to have the server form that results in a client form.
     
    Before migrating to .NET2.0 i wrote kind of a hack to simulate a server form that now didnt work any longer due to some internal changes.
     
    I now have a simple httphandler rendering the page contents, userdefined controls and the cuteeditorwrapper control. this control will create a dummy page control, add a server form and an instance of the cuteeditor control and render. since the server form added is also a wrapper that removes its form markup, everything is fine now.
     
    if someone is interested in the code (simple and relyable now), write me.
     
    thanx adam for suggesting to help me.
    it'd be great if you could give me some answers:
    - what's done internally with the server form?
    - where is the settings and user data saved, when not in the viewstate?
    - is there any security lack or problem with my solution above?
     
    cheers,
    matt
     
View as RSS news feed in XML