» New pastecode


» Posted by noname at 09/03/2008 20:39:02


» ID: http://www.wilcob.com/Wilco/Pastecode/7716/showpaste.aspx


» Language: ASPX


« Previous - Next »
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 

<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Wilco.Web.Silverlight" Namespace="Wilco.Web.Silverlight" TagPrefix="wilco" %>
<script runat="server" language="C#">
void button_Click(object sender, EventArgs e) {
    messageLabel.Text = "Clicked on " + ((Wilco.Web.Silverlight.Button)sender).ID + " - value = " + inputTextBox.Text;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ViewPorts Demo</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ul>
          <li>
            <a href="/Wilco/Pastecode/7610/showpaste.aspx">CustomTemplate.aspx (source)</a>
          </li>
          <li>
            <a href="/Wilco/Silverlight/asp-net-silverlight-component-development.aspx">Related article</a>
          </li>
        </ul>

        <div>
            <asp:Label id="messageLabel" runat="server" Text="No status yet..." /><br />
            <asp:TextBox id="inputTextBox" runat="server" />
        </div>
        <wilco:SilverlightDomain runat="server" ID="myDomain">
            <wilco:Button ID="button1" runat="server" BackgroundColor="Red" OnClick="button_Click" Text="Button 1" />
            <wilco:Button ID="button2" runat="server" BackgroundColor="Blue" OnClick="button_Click" Text="Button 2" />
            <wilco:Button ID="button3" runat="server" BackgroundColor="Green" OnClick="button_Click" Text="Button 3" />
            <wilco:Button ID="button4" runat="server" BackgroundColor="Yellow" OnClick="button_Click" Text="Button 4" Width="150" Height="50" />

            <wilco:GridViewPort runat="server" Height="300" Width="100%">
                <wilco:GridViewPortItem ControlID="button1" Column="0" />
                <wilco:GridViewPortItem ControlID="button2" Column="1" />
                <wilco:GridViewPortItem ControlID="button3" Column="0" Row="1" />
                <wilco:GridViewPortItem ControlID="button4" Column="1" Row="1" />
            </wilco:GridViewPort>
        </wilco:SilverlightDomain>
    </div>
    </form>
</body>
</html>