PDA

View Full Version : [CLOSED] ASP.NET Server Control inside FormPanel



UnifyEducation
May 25, 2012, 8:01 AM
Hi,

How can I add ASP.NET Server Control or another control (for example ReCaptcha) inside a FormPanel?


@(Html.X().FormPanel().ID("registerForm")
.Title("Register")
.BodyPadding(5)
.ButtonAlign(Alignment.Right)
.Items(item =>
{
item.Add(Microsoft.Web.Helpers.ReCaptcha.Html) // Here, I want to add ASP.NET Server Control and ReCaptcha
}))

Daniil
May 25, 2012, 10:26 AM
Hi,

I can suggest the following way.

Example

<!DOCTYPE html>

<html>
<head>
<title>Ext.Net.MVC v2 Example</title>
</head>
<body>
@Html.X().ResourceManager()

@{Ext.Net.Panel panel = new Ext.Net.Panel();
panel.ContentControls.Add(new System.Web.UI.WebControls.Label()
{
Text = "I am ASP.NET Label"
});
}

@panel.ToBuilder()
</body>
</html>

Daniil
May 25, 2012, 11:07 AM
One important note: ASP.NET native web controls are not designed to use with ASP.NET MVC and, respectively, should not be used.