none
how to create a web app using asp.net MVC3 template

    Dotaz

  • Hi

      I want to create a web app using asp.net mvc3 template

    I searched a lot but I didn't get the exact procedure for designing UI

    how to create UI part using this template because I want to create a web app and should be deployed on windows azure

    for this I selected this template(asp.net mvc3 web role)

    but this is very much strange to me

    how to design uI and bind controls to database

    if anybody know  the answer or sample app  please help me


    srujana


    13. dubna 2012 13:13

Odpovědi

Všechny reakce

  • Hi,

    If you talk about "binding" and "controls" I'm assuming you have experience with build ASP.NET web applications. If this is the case, you should use the ASP.NET Web Role and not the ASP.NET MVC Web Role. In the ASP.NET Web Role, you'll be able to use controls, binding, ...

    Note: to learn more about ASP.NET MVC follow this link: http://www.asp.net/mvc 

    Sandrino


    Sandrino Di Mattia | Twitter: http://twitter.com/sandrinodm | Azure Blog: http://fabriccontroller.net/blog | Blog: http://sandrinodimattia.net/blog

    13. dubna 2012 14:26
  • Hi ,

      When I adding view(asp.net mvc3 web role template) It has two choices

    1.asmx(c#)

    2.Razor(csHTMl)

    which is the better option and what is the exact difference between these two


    srujana

    14. dubna 2012 7:10
  • 14. dubna 2012 16:00
    Moderátor
  • Thanks arwind

    can u give one sample code for dropdown list box what I developed in normal web site

    because I am unable to do this in mvc3

     protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        
            
        {
            switch (DropDownList1.SelectedItem.ToString())
            {

                case "Fruits":
                  

                  a.Items.Clear();

                   a.Items.Add("Apple");

                  a.Items.Add("mango");

                  a.Items.Add("Grapes");

                    break;



                case "Vegtables":

                 a.Items.Clear();

                a.Items.Add("Alu");

                    a.Items.Add("Brinjal");

                  a.Items.Add("Carrot");

                    break;

                case "Nuts":

                 a.Items.Clear();

                 a.Items.Add("Badam");

                  a.Items.Add("Kismis");

                a.Items.Add("Kaaju");

                    break;
                case "Rice":
                    a.Items.Clear();
               a.Items.Add("Basmathi");
               a.Items.Add("samamasuri");
                    break;
            }
        }
       
        protected void a_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (a.SelectedItem.ToString())
            {
                case "Apple":
                    RadioButtonList1.Items.Clear();
                    RadioButtonList1.Items.Add("10%");
                    RadioButtonList1.Items.Add("20%");
                  
                    break;
                case "Brinjal":
                    RadioButtonList1.Items.Clear();
                    RadioButtonList1.Items.Add("10%");
                    RadioButtonList1.Items.Add("20%");
                        RadioButtonList1.Items.Add("30%");
                        break;

            }
        }
        protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (RadioButtonList1.SelectedItem.ToString())
            {
                case "10%":
                     Label7.Text = "";
                    Label10.Text = "";
                    Label11.Text = "";
                    Label12.Text = "";
                    Label7.Text = "before Offer";
                    Label10.Text = "200";
                    Label11.Text = "After Offer";
                    Label12.Text = "180";
                    break;
                case "20%":
                    Label7.Text = "";
                    Label10.Text = "";
                    Label11.Text = "";
                    Label12.Text = "";
                     Label7.Text = "before Offer";
                    Label10.Text = "300";
                    Label11.Text = "After Offer";
                    Label12.Text = "240";

                        break;
                case "30%":
                     Label7.Text = "";
                    Label10.Text = "";
                    Label11.Text = "";
                    Label12.Text = "";
                    Label7.Text = "before Offer";
                    Label10.Text = "100";
                    Label11.Text = "After Offer";
                    Label12.Text = "70";
                    break;
            }
        }
    }


    srujana

    16. dubna 2012 10:19
  • Hi,

    There's a Rick's sample shows how to use Dropdownlist in MVC3, please refer to the following link:

    http://code.msdn.microsoft.com/Using-the-DropDownList-67f9367d

    Hope this helps.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    16. dubna 2012 10:55
    Moderátor