Hope someone can help with this.... I am currently writing an app using asp.net and c# which will use UIP. I keep getting a stack overflow exception in my form code.. i thinkn I know why (recursion in the property) but do not know what the alternative option
is.
We have several apps that use UIP perfectly well and these were written in vb gthe vb code looks like this:
#Region "UIP Manager Plumbing " Private Shadows ReadOnly Property Controller()
As BaseController Get
Return CType(MyBase.Controller, BaseController) End Get
End Property
#End Region
Protected Sub Button1_Click(ByVal sender
As Object, ByVal e As System.EventArgs)
Handles Button1.Click ' Response.Redirect("WebForm2.aspx")
Controller.toPage2() End Sub
End Class
however attempting to do a similar thing in c# causes the overflow exception in the property. My c# version of the property is as follows (bear with me if this is rubbish, i have been doing c# for 3 weeks with no training !!)
public partial class WebForm1 : WebFormView
{ #region"UIP Manager Plumbing " private new BaseController Controller
{ get
{ return (BaseController) this.Controller;
}
}
#endregion
Im really stuck and dont know what to do as the only examples i have of how to approach the task are the existing VB apps we have (and these all work perfectly well). Can someone tell me where I'm going wrong please ?
cookiemonste...
Member
10 Points
2 Posts
Stack overflow exception in UIP manager Plumbing for forms.
Jun 27, 2006 12:54 PM|LINK
Hope someone can help with this.... I am currently writing an app using asp.net and c# which will use UIP. I keep getting a stack overflow exception in my form code.. i thinkn I know why (recursion in the property) but do not know what the alternative option is.
We have several apps that use UIP perfectly well and these were written in vb gthe vb code looks like this:
Imports Microsoft.ApplicationBlocks.UIProcess
Imports UIP.UIPABController
Partial Class WebForm1
Inherits WebFormView
#Region "UIP Manager Plumbing "
Private Shadows ReadOnly Property Controller() As BaseController
Get
Return CType(MyBase.Controller, BaseController)
End Get
End Property
#End Region
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
' Response.Redirect("WebForm2.aspx")
Controller.toPage2()
End Sub
End Class
however attempting to do a similar thing in c# causes the overflow exception in the property. My c# version of the property is as follows (bear with me if this is rubbish, i have been doing c# for 3 weeks with no training !!)
public partial class WebForm1 : WebFormView
{
#region "UIP Manager Plumbing "
private new BaseController Controller
{
get
{
return (BaseController) this.Controller;
}
}
#endregion
Im really stuck and dont know what to do as the only examples i have of how to approach the task are the existing VB apps we have (and these all work perfectly well). Can someone tell me where I'm going wrong please ?
thanks