Modified:
trunk/xsp/ChangeLog
trunk/xsp/test/1.1/webcontrols/web_linkbutton.aspx
Log:
2007-11-20 Marek Habersack <mhabe...@novell.com>
* test/1.1/webcontrols/web_linkbutton.aspx: make the sample
work. Clicking 'Remove this link' actually does something
now. Same for the 'Click me!' button.
Modified: trunk/xsp/ChangeLog
===================================================================
--- trunk/xsp/ChangeLog 2007-11-20 19:06:19 UTC (rev 90011)
+++ trunk/xsp/ChangeLog 2007-11-20 19:15:31 UTC (rev 90012)
@@ -1,5 +1,9 @@
2007-11-20 Marek Habersack <mhabe...@novell.com>
+ * test/1.1/webcontrols/web_linkbutton.aspx: make the sample
+ work. Clicking 'Remove this link' actually does something
+ now. Same for the 'Click me!' button.
+
* All the samples are using common look now. A common header has
been added to provide consistent look and sample navigation. 1.1
mode uses a poor man's implementation of the 2.0 SiteMap reader,
Modified: trunk/xsp/test/1.1/webcontrols/web_linkbutton.aspx
===================================================================
--- trunk/xsp/test/1.1/webcontrols/web_linkbutton.aspx 2007-11-20 19:06:19 UTC (rev 90011)
+++ trunk/xsp/test/1.1/webcontrols/web_linkbutton.aspx 2007-11-20 19:15:31 UTC (rev 90012)
@@ -4,20 +4,30 @@
<head>
<link rel="stylesheet" type="text/css" href="/mono-xsp.css">
<script runat="server">
- void Clicked (Object sender, EventArgs e)
+ void Clicked (object sender, EventArgs e)
{
+ label1.Text = " <- you've just clicked it!";
}
+
+ void OnLb2Command (object sender, CommandEventArgs e)
+ {
+ if (e.CommandName == "Remove_this") {
+ lb2.Visible = false;
+ label2.Text = "There used to be a link here, but you have removed it";
+ }
+ }
</script>
<title>LinkButton as submit and command</title>
</head>
<body><mono:MonoSamplesHeader runat="server"/>
<form runat="server">
-<asp:LinkButton id="lb1" Text="Push me!" OnClick="Clicked"
-runat="server"/>
+<asp:LinkButton id="lb1" Text="Click me!" OnClick="Clicked" runat="server"/>
+<asp:Label id="label1" Text="" runat="server"/>
<br>
-<asp:LinkButton id="lb2" command="Remove_this" runat="server">
+<asp:LinkButton id="lb2" CommandName="Remove_this" OnCommand="OnLb2Command" runat="server">
Remove this link.
</asp:LinkButton>
+<asp:Label id="label2" Text="" runat="server"/>
</form>
</body>
</html>