Welcome Guest Search | Active Topics | Sign In | Register

How to use EO.Web Controls with MVC Options
eo_support
Posted: Monday, March 14, 2011 10:00:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,206
Follow these steps to use EO.Web Controls in MVC views:

1. If you use MVC 3,, make sure you use ASPX layout engine (instead of Razor engine). EO.Web Controls only works with ASPX layout engine;
2. Add a server form into your view if you do not already have one:

Code: HTML/ASPX
<form runat="server" id="form1">

  ....place server controls here..... 

</form>


3. Drag and drop any EO.Web Controls from the toolbox inside the server form element added in step 2;

4. If you use MVC2/MVC3, add the following code into your page if you wish to handle server event:

Code: C#
public override void RenderView(ViewContext viewContext)
{
    ViewContext = viewContext;
    InitHelpers();

    ProcessRequest(HttpContext.Current);
}


Run the page. The control should function the same as in a regular Web Form page.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.