Protected void rptActiveCodesOfGame_ItemDataBound (object sender, RepeaterItemEventArgs e)
{
DropDownList ddl = e. Item. FindControl ("ddlSelectServer") as DropDownList;
If (ddl! = Null)
{
List <GameActiveCodeInfo> tempList = new List <GameActiveCodeInfo> ();
GameActiveCodeInfo g = e. Item. DataItem as GameActiveCodeInfo;
If (g! = Null ){
TempList = listAll. FindAll (x => x. GameId = g. GameId );
Foreach (var x in tempList)
{
Ddl. Items. Add (new ListItem (x. GameServerName, x. BatchId. ToString ()));
}
Ddl. Items [0]. Selected = true;
}
HtmlAnchor a = e. Item. FindControl ("aGetCode") as HtmlAnchor;
If (! = Null)
{
A. Attributes ["onclick"] = "GameActiveCode. GetGameActiveCode ('" + g. GameShort + "', '" + ddl. ClientID + "');";
}
DropDownList ddlist = e. Item. FindControl ("ddlSelectServer") as DropDownList;
If (ddlist! = Null)
{
Ddlist. Attributes ["onchange"] = "GameActiveCode. GetActiveCodeDetail ('" + ddl. ClientID + "', '" + g. GameShort + "');";
}
}
}