1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    49
    Vote Rating
    0
    anmol is on a distinguished road

      0  

    Default Answered: How to use ExtJs with asp.net

    Answered: How to use ExtJs with asp.net


    Hi Guys,
    I am a asp.net guy and i want to create a website using ExtJs.
    Can any one tell me how do i access the controls from the asp.net code behind (server side code).
    Can any give me the links which shows how to connect asp.net and ExtJs.

    I have already put this subject in this forum but nobody replied so i urge the forum admins to help me out.

    Note : I don't want to use Ext.Net

  2. I suggest using ASP.NET MVC3 along with ExtDirectMVC.
    I am actively building an intranet site using these.

  3. #2
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    I suggest using ASP.NET MVC3 along with ExtDirectMVC.
    I am actively building an intranet site using these.

  4. #3
    Sencha User
    Join Date
    May 2012
    Posts
    49
    Vote Rating
    0
    anmol is on a distinguished road

      0  

    Default


    Hi billtricarico,
    Can you please share any sample application which uses extJs and asp.net.
    It will help not just me but entire .net community which is trying to use ExtJs with asp.net.

    Thanks billtricarico.

  5. #4
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    anmol,

    Have you downloaded the ExtDirect MVC project? There is an ASP.NET MVC3 demo project in there. That should get you started.

    Here is the official thread

  6. #5
    Sencha User
    Join Date
    May 2012
    Posts
    49
    Vote Rating
    0
    anmol is on a distinguished road

      0  

    Default


    Hi billtricarico,
    I cant see any HTML or aspx page in the given sample.

  7. #6
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    In the download is an Mvc3Demo solution. See attached screenshot. Everything you need to get started is in this sample project.


    ExtMvc3Demo.PNG

  8. #7
    Sencha User
    Join Date
    May 2012
    Posts
    49
    Vote Rating
    0
    anmol is on a distinguished road

      0  

    Default


    which page i should set as 'run-as' page.
    what are csHTML files.

  9. #8
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    ASP MVC3 does not really use the "Set As Start Page" like classic ASP does, but you can force it to the Index.cshtml file I suppose.

    Check the Global.asax.cs file to see how the view routes are set up. It will say that the "Default" route name points to the "Home" controller with the action "Index". That means there is a controller class in the Controllers folder called HomeController. That class has an action method called "Index". That means there is a View called "Index", in the "Home" folder, which is in the Views folder.

    So when you point your browser to http://localhost, it will, by default, look for the Index.cshtml file

  10. #9
    Sencha User
    Join Date
    May 2012
    Posts
    49
    Vote Rating
    0
    anmol is on a distinguished road

      0  

    Default


    Hi billtricarico,
    Thanks a lot for your help,
    but i am still not clear about many things.
    Consider an example i have 'html' page which accepts the employee information,
    That HTML page have some textboxes which accept the information of employee,
    at last there is a 'Save' button, when i click this save button i want to pass the employee information as an object to the server side (may be webservice function) and it will be saved there.
    How do i do this ?

    Thanks in advance !

  11. #10
    Sencha User
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    134
    Answers
    7
    Vote Rating
    2
    billtricarico is on a distinguished road

      0  

    Default


    The way you are describing it, you are not using any ExtJS components. You should have a basic ExtJS application in place which is launched from your HTML file. In your ExtJS app, you would have a FormPanel or something similar to accept the employee information. You would create an event handler for your ExtJS submit button, which would call an ExtDirect method that the ASP.NET MVC3 Controller will receive as a JSON object.

Thread Participants: 1