PDA

View Full Version : Sample Application on MVC 4 with Ext.Net



sundarsureshin
Jun 23, 2014, 4:02 PM
Hi,

I am quite new to Ext.Net controls, can anyone send me a sample application on MVC 4(aspx view) with Ext.net controls like text field, combobox or grid panel

i jus added the textfield control, it was not displaying on the View page

Can anyone help me

Thanks in advance
G Suresh

Daniil
Jun 24, 2014, 3:41 PM
Hi @sundarsureshin,

Welcome to the Ext.NET forums!

There is the MVC Examples Explorer online.
http://mvc.ext.net/

Also you can download Ext.NET with the full sources of the MVC Examples Explorer.
http://www.ext.net/download/

sundarsureshin
Jun 28, 2014, 9:22 AM
View Page
==================

@Html.X().ResourceManager()



<div>

Name : @Html.TextBoxFor(model => model.Name, new { @class = "x-form-field", style = "width:300px;" })<br />
Address : @Html.TextBoxFor(model => model.Address, new { @class = "x-form-field", style = "width:300px;" })<br />
City : @Html.TextBoxFor(model => model.City, new { @class = "x-form-field", style = "width:300px;" })<br />
Country : @Html.TextBoxFor(model => model.Country, new { @class = "x-form-field", style = "width:300px;" })<br />
</div>
<div>
@( Html.X().Button() .Text("Submit")

.DirectEvents(de => {
de.Click.Url = Url.Action("DirectEventSubmit");
de.Click.EventMask.ShowMask = true;
})
)
</div>
=======================================
Controller
=======================================


public ActionResult DirectEventSubmit()
{
return this.Direct();
}

=======================================
Model
=======================================

public class Enquiry
{
DbFactory ObjDbfactory;
protected void InitializeDB()
{
ObjDbfactory = new DbFactory(DataBaseType.SQLServer, ConfigurationManager.ConnectionStrings["DatabaseConnection"].ConnectionString);
}

public string Mode { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string Country { get; set; }
}

i had tried calling the model in the view page, it displays only the null value, please give me solution, how to get the value passed from the view page to the controller.

Thanks in advance,
Suresh G

Daniil
Jul 01, 2014, 3:31 PM
Here is a related thread.
http://forums.ext.net/showthread.php?38411