[Mono-dev] Postback on Custom Controls

Juraj Skripsky js at hotfeet.ch
Tue Jun 20 09:49:59 EDT 2006


Thanks for the test case! I'll look into it.

Maybe you should have a look at the source code of WebControl:
http://svn.myrealbox.com/viewcvs/*checkout*/trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs?rev=57676

There you can see that Render() calls RenderBeginTag() which in turn
calls AddAttributesToRender(). This method is overridden in LinkButton
and adds the __doPostBack stuff.

- Juraj


On Tue, 2006-06-20 at 13:42 +0200, APS wrote:
> Ok, I wrote a simple test site, I attach the solution (I develop in 
> VS.NET and then deploy to Mono).
> I changed my code using GetPostBack... and it works fine, let me know 
> if I was doing something wrong or if you retain it a Mono bug.
> 
> 
> At 13.29 20/06/2006, you wrote:
> >Hi,
> >
> >If it works on .Net and fails on Mono, it's probably a bug in Mono.
> >Could you post the code? We're very interested in making Mono as
> >compatible to .Net as possible.
> >
> >- Juraj
> >
> >
> >On Tue, 2006-06-20 at 13:11 +0200, APS wrote:
> > > I changed the mail subject according to the problem.
> > > I've investigated on my problem and I've found that if I make a new
> > > custom control inheriting, for example, from a LinkButton and I
> > > completely rewrite the OnRender without calling the base method .Net
> > > adds the __doPostBack javascript function, mono doesn't.
> > > I think that is because I didn't wrote any postback calls, in fact if
> > > I call the Page.GetPostBackClientEvent Mono correctly adds the
> > > __doPostBack function, .Net instead always adds it cause it looks at
> > > the LinkButton object.
> > >
> > > In some ways this can be correct, if not used is unuseful to add it,
> > > but if I've to manage in a different way the postback funztionality,
> > > how can I force mono to write the __doPostBack function?
> > >
> > > At 20.33 19/06/2006, Juraj Skripsky wrote:
> > > >Hi,
> > > >
> > > >It's hard to see what's wrong from your description alone. Could you
> > > >provide some code or a test case?
> > > >
> > > >- Juraj
> > > >
> > > >On Mon, 2006-06-19 at 19:16 +0200, APS wrote:
> > > > > Going on with tests I was that probably the problem is not due to
> > > > > ascxs but to a custom control I've build.
> > > > > In this control I render manually the output writing a call to
> > > > > __doPostBack.
> > > > > I thought that in this case I should instruct mono to write the
> > > > > __doPostBack function for my control so I used a
> > > > > this .Page.RegisterRequiresPostBack( this ); before the rendering
> > > > > operation but mono still not write the __doPostBack function.
> > > > > Someone knows if I've to do something more?
> > > > > _______________________________________________
> > > > > Mono-devel-list mailing list
> > > > > Mono-devel-list at lists.ximian.com
> > > > > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> > >
> > > _______________________________________________
> > > Mono-devel-list mailing list
> > > Mono-devel-list at lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list