1
Answer

Dropdown list in mvc3

Photo of Ganesh Kumar

Ganesh Kumar

12y
1.5k
1
I have to insert selected drop down list box value and retrieve for update in mvc3 with razor engine so please explain briefly.

Answers (1)

1
Photo of Vulpes
NA 98.3k 1.5m 12y
If it's a Windows Forms application, you'll need this 'using' directive at the top of the class file:

   using System.Windows.Forms;

If it's a console application, you'll need to add a reference to System.Windows.Forms.dll as well as adding the above 'using' directive.
Accepted
5
Photo of Jignesh Trivedi
NA 61.3k 14.2m 12y
hi,

agree with Vuples

public int dummy
{
    get
    {
        return 0;
    }
    set
    {
        System.Windows.Forms.MessageBox.Show("set Property");
    }
}

hope this will help you.
0
Photo of Arun Kurmi
NA 106 72.8k 12y
But what is syntax for this.Because MessageBox.show give error during writing it in set block.
0
Photo of Satyapriya Nayak
NA 53k 8m 12y
http://www.c-sharpcorner.com/UploadFile/rajeshvs/PropertiesInCS11122005001040AM/PropertiesInCS.aspx
0
Photo of Jignesh Trivedi
NA 61.3k 14.2m 12y
hi,

1) yes, you can put message box in set block.
2) you are getting error on code stu.name="some one not arun";  right?
 this is due to name is private member of class. .NET does not allow you to access private member out side of scope. so you got the error.

hope this will help you.