rendered paste body<%@ Page Language="C#" Debug="True"%>
<%@ Import namespace="System.Xml"%>
<%@ Import namespace="System.Xml.XPath"%>
<script runat="server">
public Int32 PlacedLocations;
public Button Button11;
public Table Field;
public TableRow Row1;
public TableCell Cell11;
public DropDownList Locations;
public void BuildField(Object Sender, EventArgs E)
{
play.Controls.Remove(SealedDeck);
Locations = new DropDownList();
Locations.ID = "Locations";
ListItem Item1 = new ListItem();
ArrayList Deck = GetDeck();
ArrayList Locs = (ArrayList) Deck[4];
Item1.Text = GetCardName(Locs[0].ToString());
Item1.Value = Locs[0].ToString();
Locations.Items.Add(Item1);
play.Controls.Add(Locations);
Field = new Table();
Row1 = new TableRow();
Cell11 = new TableCell();
Button11 = new Button();
Button11.ID = "X1Y1";
Button11.Click += new System.EventHandler(PlaceLocation);
Button11.Text = "Here";
Cell11.Controls.Add(Button11);
Row1.Cells.Add(Cell11);
Field.Rows.Add(Row1);
play.Controls.Add(Field);
}
public void PlaceLocation(Object Sender, EventArgs E)
{
if (PlacedLocations == 2)
{
ArrayList Deck = GetDeck();
ArrayList Hav = (ArrayList) Deck[2];
ListItem Item8 = new ListItem();
Item8.Value = Hav[0].ToString();
Item8.Text = GetCardName(Hav[0].ToString());
Locations.Items.Add(Item8);
}
Button SelectedLocation = (Button) Sender;
SelectedLocation.Text = Locations.SelectedItem.Value;
SelectedLocation.Click -= new System.EventHandler(PlaceLocation);
Locations.Items.Remove(Locations.SelectedItem);
}
</script><html>
<head>
<title>
play.ani-mayhem.com
</title>
</head>
<body>
<form Runat="server" ID="play" method="post">
<asp:Button Runat="server" ID="SealedDeck" Text="Sealed Deck (Random)" OnClick="BuildField"/>
</form>
</body>
</html>