Crew .NET |
|
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void bewerking(object sender, EventArgs e)
{
string item = lijst.SelectedItem.Text;
//Doe iets met "item"
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:DropDownList ID="lijst" runat="server">
<asp:ListItem>Een</asp:ListItem>
<asp:ListItem>Twee</asp:ListItem>
<asp:ListItem>Drie</asp:ListItem>
<asp:ListItem>Vier</asp:ListItem>
</asp:DropDownList>
<br /><br />
<asp:Button ID="knop" runat="server" Text="Klik" OnClick="bewerking" />
</form>
</body>
</html>
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> protected void bewerking(object sender, EventArgs e) { string item = lijst.SelectedItem.Text; //Doe iets met "item" } </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:DropDownList ID="lijst" runat="server"> <asp:ListItem>Een</asp:ListItem> <asp:ListItem>Twee</asp:ListItem> <asp:ListItem>Drie</asp:ListItem> <asp:ListItem>Vier</asp:ListItem> </asp:DropDownList> <br /><br /> <asp:Button ID="knop" runat="server" Text="Klik" OnClick="bewerking" /> </form> </body> </html>
|