tikimyster

Page.aspx

Oct 2nd, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 6.79 KB | None | 0 0
  1. <form id="form" runat="server">
  2.                         <br />
  3.                         Search for a Friend</label>
  4.                         <input type="text" name="txtfindfriend" id="txtfindfriend" />
  5.                         <%--Maybe make these options Images--%>
  6.                         <input type="submit" id="submitter" value="get friend" />
  7.                             <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged">
  8.                             <asp:ListItem Selected="True" ID="All_Check">All</asp:ListItem>
  9.                             <asp:ListItem ID="Xbox_Check">Xbox Live</asp:ListItem>
  10.                             <asp:ListItem ID="PSN_Check">PSN</asp:ListItem>
  11.                             <asp:ListItem ID ="Wii_Check">Wii</asp:ListItem>
  12.                             <asp:ListItem ID ="Steam_Check">Steam</asp:ListItem>
  13.                             <asp:ListItem ID ="Origin_Check">Origin</asp:ListItem>
  14.                         </asp:CheckBoxList>
  15.  
  16.                         <br />
  17.  
  18. <%
  19. var firstname = (string)nwReader["firstname"];
  20.                                var lastname = (string)nwReader["lastname"];
  21.                                var email = (string)nwReader["email"];
  22.                                var xboxlive = (string)nwReader["xbox"];
  23.                                var psn = (string)nwReader["psn"];
  24.                                var steam = (string)nwReader["steam"];
  25.                                var origin = (string)nwReader["origin"];
  26.                                var wii = (string)nwReader["wii"];
  27.                                Response.Write("xbox" + xboxlive + "PSN" + psn + "Steam" + steam + "Origin" + origin + "Wii" + wii);
  28.                                //a1.Visible = true;
  29.                                if (All_Check.Selected)
  30.                                {
  31.                                    if (xboxlive != "")
  32.                                    {
  33.                                        a2.Visible = true;
  34.                                    }
  35.                                    else
  36.                                    {
  37.                                        a2.Visible = false;
  38.                                    }
  39.                                    if (psn != "")
  40.                                    {
  41.                                        a3.Visible = true;
  42.                                    }
  43.                                    else
  44.                                    {
  45.                                        a3.Visible = false;
  46.                                    }
  47.                                    if (steam != "")
  48.                                    {
  49.                                        a4.Visible = true;
  50.                                    }
  51.                                    else
  52.                                    {
  53.                                        a4.Visible = false;
  54.                                    }
  55.                                    if (origin != "")
  56.                                    {
  57.                                        a5.Visible = true;
  58.                                    }
  59.                                    else
  60.                                    {
  61.                                        a5.Visible = false;
  62.                                    }
  63.                                    if (wii != "")
  64.                                    {
  65.                                        a6.Visible = true;
  66.                                    }
  67.                                    else
  68.                                    {
  69.                                        a6.Visible = false;
  70.                                    }
  71.                                }
  72.                                else if(Xbox_Check.Selected)
  73.                                {
  74.                                    a2.Visible = true;
  75.                                    a3.Visible = false;
  76.                                    a4.Visible = false;
  77.                                    a5.Visible = false;
  78.                                    a6.Visible = false;
  79.                                
  80.                                    if(xboxlive == "")
  81.                                    {
  82.                                        a2.InnerHtml = "<h3>Oh no! It seems this person does not have Xbox Live!</h3>";
  83.                                     }
  84.                                 }
  85.                                 else if (PSN_Check.Selected)
  86.                                 {
  87.                                     a2.Visible = false;
  88.                                     a3.Visible = true;
  89.                                     a4.Visible = false;
  90.                                     a5.Visible = false;
  91.                                     a6.Visible = false;
  92.                                 }
  93.                                 else if (Wii_Check.Selected)
  94.                                 {
  95.                                     a2.Visible = false;
  96.                                     a3.Visible = false;
  97.                                     a4.Visible = false;
  98.                                     a5.Visible = false;
  99.                                     a6.Visible = true;
  100.                                 }
  101.                                 else if (Steam_Check.Selected)
  102.                                 {
  103.                                     a2.Visible = false;
  104.                                     a3.Visible = false;
  105.                                     a4.Visible = true;
  106.                                     a5.Visible = false;
  107.                                     a6.Visible = false;
  108.                                 }
  109.                                 else if (Origin_Check.Selected)
  110.                                 {
  111.                                     a2.Visible = false;
  112.                                     a3.Visible = false;
  113.                                     a4.Visible = false;
  114.                                     a5.Visible = true;
  115.                                     a6.Visible = false;
  116.                                 }
  117.                                
  118.                                   a2.InnerHtml = "<h3>Gamer Tag</h3> <a href=\"../api/gamertag.php?gamertag=" + xboxlive + "\">" + xboxlive + "</a>";
  119.                                   a3.InnerHtml = "<h3>PSN</h3>" + psn;
  120.                                   a4.InnerHtml = "<h3>Steam Name</h3>" + steam;
  121.                                   a5.InnerHtml = "<h3>Origin Name</h3>" + origin;
  122.                                   a6.InnerHtml = "<h3>Wiiverse Name</h3>" + wii;
  123.                                
  124.                             }
  125.                             nwReader.Close();
  126.                             conn.Close();
  127.                            
  128.                         %>
Advertisement
Add Comment
Please, Sign In to add comment