I have created usercontrol (.ascx) as a webpart. When I deployed it, I got a prompt for login and 401 error.
The error occurs when I call Me.CreateChildControls().
Help Please.
I created a class that inherits WebPart. Here is my code in VB.
Imports Microsoft.SharePoint.WebPartPages
Public class UserControlWebPart
Inherits Webpart
Protected Overrides Sub CreateChildControls()<br>
Dim control as MyPage = Me.Page.LoadControl(mycontrolpath)<br>
Control.add(control)<br>
Me.CretaeChildControls()<br>
End Sub
Protected Overriedes Sub RenderContents(Byval writer as System.Text.HtmlWriter)<br>
Me.RenderContents(writer)<br>
End Sub<br>
End Class
I followed example from this site, http://www.codeproject.com/KB/sharepoint/SharepointWebPart.aspx; everything is working. I'm rewrite the code in Vb because all my current .ascx are written in vb. This is when I ran into permission issue (note: no permission issue with c#)