This is a Trinary tree for mlm dynamic binding.
ASPX PAGE
-----------------------------------------------
<div>
<center>
<table>
<tr>
<td colspan="3" style="text-align:right"">
<table width="90%">
<tr>
<td colspan="3" style="text-align:center;">
<asp:LinkButton ID="LinkButton1" runat="server" Font-Underline="False"
>Lb1</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton18" Font-Underline="false" runat="server">Lb18</asp:LinkButton>
</td>
</tr>
<tr>
<td colspan="3" style="text-align:center">
<asp:Image ID="Image1" Width="600px" Height="40px" ImageUrl="~/images/arrow.png" runat="server" />
|
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:250px;">
<table width="100%">
<tr>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;"><asp:LinkButton ID="LinkButton2" runat="server" Font-Underline="False" onclick="LinkButton2_Click" >Lb2</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton15"
Font-Underline="False" runat="server" onclick="LinkButton15_Click">LinkButton</asp:LinkButton>
</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:250px;">
<table width="100%">
<tr>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;"><asp:LinkButton ID="LinkButton3" runat="server" Font-Underline="False"
onclick="LinkButton3_Click">Lb3</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton16" Font-Underline="False" runat="server" onclick="LinkButton16_Click">LinkButton</asp:LinkButton>
</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:250px;">
<table width="100%">
<tr>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;"><asp:LinkButton ID="LinkButton4" runat="server" Font-Underline="False"
onclick="LinkButton4_Click" >Lb4</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton17" Font-Underline="False" runat="server" onclick="LinkButton17_Click">LinkButton</asp:LinkButton>
</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td>
<asp:LinkButton ID="LinkButton14" runat="server" ForeColor="Red"
onclick="LinkButton14_Click"
Font-Underline="False">From Top</asp:LinkButton>
</td>
</tr>
<tr>
<td style="width:300px;">
<table width="100%">
<tr>
<td colspan="3">
<asp:Image ID="Image2" Width="250px" Height="45px" ImageUrl="~/images/arrow.png" runat="server" />
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton5" runat="server" Font-Underline="False"
onclick="LinkButton5_Click">Lb5</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton19" Font-Underline="False" runat="server" onclick="LinkButton19_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%-- <td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton6" runat="server" Font-Underline="False"
onclick="LinkButton6_Click" >Lb6</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton20" Font-Underline="False" runat="server" onclick="LinkButton20_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton7" runat="server" Font-Underline="False"
onclick="LinkButton7_Click" >Lb7</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton21" Font-Underline="False" runat="server" onclick="LinkButton21_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td style="width:300px;">
<table width="100%">
<tr>
<td colspan="3">
<asp:Image ID="Image3" Width="250px" Height="45px" ImageUrl="~/images/arrow.png" runat="server" />
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton8" runat="server" Font-Underline="False"
onclick="LinkButton8_Click" >Lb8</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton22" Font-Underline="False" runat="server" onclick="LinkButton22_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%-- <td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton9" runat="server" Font-Underline="False"
onclick="LinkButton9_Click" >Lb9</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton23" Font-Underline="False" runat="server" onclick="LinkButton23_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton10" runat="server" Font-Underline="False"
onclick="LinkButton10_Click" >Lb10</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton24" Font-Underline="False" runat="server" onclick="LinkButton24_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td style="width:300px;">
<table width="100%">
<tr>
<td colspan="3">
<asp:Image ID="Image4" Width="250px" Height="45px" ImageUrl="~/images/arrow.png" runat="server" />
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton11" runat="server" Font-Underline="False"
onclick="LinkButton11_Click" >Lb11</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton25" Font-Underline="False" runat="server" onclick="LinkButton25_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%-- <td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton12" runat="server" Font-Underline="False"
onclick="LinkButton12_Click" >Lb12</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton26" Font-Underline="False" runat="server" onclick="LinkButton26_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton13" runat="server" Font-Underline="False"
onclick="LinkButton13_Click">Lb13</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton27" Font-Underline="False" runat="server" onclick="LinkButton27_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
CS PAGE
----------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace worldhelp
{
public partial class Tree : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con1"].ConnectionString);
SqlDataAdapter da;
SqlCommand cmd;
DataTable dt;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
try
{
// Session["head"] = "2000";
if (!IsPostBack)
{
int head = Convert.ToInt32(Session["userid"]);
Detail(head);
LinkButton1.ForeColor = System.Drawing.Color.Green;
LinkButton18.ForeColor = System.Drawing.Color.Green;
}
}
catch (Exception)
{
}
}
public string showname(string uid)
{
string ss = "";
cmd = new SqlCommand("select name from register where uid=" + uid + "", con);
con.Open();
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
if (dr.Read())
{
ss = dr["name"].ToString();
}
}
con.Close();
return ss;
}
public void Detail(Int64 user)
{
try
{
blank();
LinkButton1.Text = user.ToString();
LinkButton18.Text = showname(user.ToString());
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L2 = dt.Rows[0]["lleg"].ToString();
string L3 = dt.Rows[0]["mleg"].ToString();
string L4 = dt.Rows[0]["rleg"].ToString();
if (L2 != "")
{
LinkButton2.Text = L2;
LinkButton15.Text = showname(L2);
LinkButton2.ForeColor = System.Drawing.Color.Green;
LinkButton15.ForeColor = System.Drawing.Color.Green;
Detail2(Convert.ToInt32(L2));
}
if (L3 != "")
{
LinkButton3.Text = L3;
LinkButton16.Text = showname(L3);
LinkButton3.ForeColor = System.Drawing.Color.Green;
LinkButton16.ForeColor = System.Drawing.Color.Green;
Detail3(Convert.ToInt32(L3));
}
if (L4 != "")
{
LinkButton4.Text = L4;
LinkButton17.Text = showname(L4);
LinkButton4.ForeColor = System.Drawing.Color.Green;
LinkButton17.ForeColor = System.Drawing.Color.Green;
Detail4(Convert.ToInt32(L4));
}
}
}
catch (Exception)
{
}
}
public void Detail2(Int64 user)
{
try
{
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L5 = dt.Rows[0]["lleg"].ToString();
string L6 = dt.Rows[0]["mleg"].ToString();
string L7 = dt.Rows[0]["rleg"].ToString();
if (L5 != "")
{
LinkButton5.Text = L5;
LinkButton19.Text = showname(L5);
LinkButton5.ForeColor = System.Drawing.Color.Green;
LinkButton19.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton5.Text = "Blank";
LinkButton19.Text = "Blank";
LinkButton5.ForeColor = System.Drawing.Color.Red;
LinkButton19.ForeColor = System.Drawing.Color.Red;
}
if (L6 != "")
{
LinkButton6.Text = L6;
LinkButton20.Text = showname(L6);
LinkButton6.ForeColor = System.Drawing.Color.Green;
LinkButton20.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton6.Text = "Blank";
LinkButton6.ForeColor = System.Drawing.Color.Red;
LinkButton20.Text = "Blank";
LinkButton20.ForeColor = System.Drawing.Color.Red;
}
if (L7 != "")
{
LinkButton7.Text = L7;
LinkButton21.Text = showname(L7);
LinkButton7.ForeColor = System.Drawing.Color.Green;
LinkButton21.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton7.Text = "Blank";
LinkButton7.ForeColor = System.Drawing.Color.Red;
LinkButton21.Text = "Blank";
LinkButton21.ForeColor = System.Drawing.Color.Red;
}
}
}
catch (Exception)
{
}
}
public void Detail3(Int64 user)
{
try
{
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L8 = dt.Rows[0]["lleg"].ToString();
string L9 = dt.Rows[0]["mleg"].ToString();
string L10 = dt.Rows[0]["rleg"].ToString();
if (L8 != "")
{
LinkButton8.Text = L8;
LinkButton22.Text = showname(L8);
LinkButton8.ForeColor = System.Drawing.Color.Green;
LinkButton22.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton8.Text = "Blank";
LinkButton22.Text = "Blank";
LinkButton8.ForeColor = System.Drawing.Color.Red;
LinkButton22.ForeColor = System.Drawing.Color.Red;
}
if (L9 != "")
{
LinkButton9.Text = L9;
LinkButton23.Text = showname(L9);
LinkButton9.ForeColor = System.Drawing.Color.Green;
LinkButton23.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton9.Text = "Blank";
LinkButton23.Text = "Blank";
LinkButton9.ForeColor = System.Drawing.Color.Red;
LinkButton23.ForeColor = System.Drawing.Color.Red;
}
if (L10 != "")
{
LinkButton10.Text = L10;
LinkButton24.Text = showname(L10);
LinkButton10.ForeColor = System.Drawing.Color.Green;
LinkButton24.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton10.Text = "Blank";
LinkButton24.Text = "Blank";
LinkButton10.ForeColor = System.Drawing.Color.Red;
LinkButton24.ForeColor = System.Drawing.Color.Red;
}
}
}
catch (Exception)
{
}
}
public void Detail4(Int64 user)
{
try
{
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L11 = dt.Rows[0]["lleg"].ToString();
string L12 = dt.Rows[0]["mleg"].ToString();
string L13 = dt.Rows[0]["rleg"].ToString();
if (L11 != "")
{
LinkButton11.Text = L11;
LinkButton25.Text = showname(L11);
LinkButton11.ForeColor = System.Drawing.Color.Green;
LinkButton25.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton11.Text = "Blank";
LinkButton25.Text = "Blank";
LinkButton11.ForeColor = System.Drawing.Color.Red;
LinkButton25.ForeColor = System.Drawing.Color.Red;
}
if (L12 != "")
{
LinkButton12.Text = L12;
LinkButton26.Text = showname(L12);
LinkButton12.ForeColor = System.Drawing.Color.Green;
LinkButton26.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton12.Text = "Blank";
LinkButton26.Text = "Blank";
LinkButton12.ForeColor = System.Drawing.Color.Red;
LinkButton26.ForeColor = System.Drawing.Color.Red;
}
if (L13 != "")
{
LinkButton13.Text = L13;
LinkButton27.Text = showname(L13);
LinkButton13.ForeColor = System.Drawing.Color.Green;
LinkButton27.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton13.Text = "Blank";
LinkButton27.Text = "Blank";
LinkButton13.ForeColor = System.Drawing.Color.Red;
LinkButton27.ForeColor = System.Drawing.Color.Red;
}
}
}
catch (Exception)
{
}
}
public void blank()
{
try
{
LinkButton1.Text = "Blank";
LinkButton2.Text = "Blank";
LinkButton3.Text = "Blank";
LinkButton4.Text = "Blank";
LinkButton5.Text = "Blank";
LinkButton6.Text = "Blank";
LinkButton7.Text = "Blank";
LinkButton8.Text = "Blank";
LinkButton9.Text = "Blank";
LinkButton10.Text = "Blank";
LinkButton11.Text = "Blank";
LinkButton12.Text = "Blank";
LinkButton13.Text = "Blank";
LinkButton15.Text = "Blank";
LinkButton16.Text = "Blank";
LinkButton17.Text = "Blank";
LinkButton18.Text = "Blank";
LinkButton19.Text = "Blank";
LinkButton20.Text = "Blank";
LinkButton21.Text = "Blank";
LinkButton22.Text = "Blank";
LinkButton23.Text = "Blank";
LinkButton24.Text = "Blank";
LinkButton25.Text = "Blank";
LinkButton26.Text = "Blank";
LinkButton27.Text = "Blank";
// LinkButton1.ForeColor = System.Drawing.Color.Red;
LinkButton2.ForeColor = System.Drawing.Color.Red;
LinkButton3.ForeColor = System.Drawing.Color.Red;
LinkButton4.ForeColor = System.Drawing.Color.Red;
LinkButton5.ForeColor = System.Drawing.Color.Red;
LinkButton6.ForeColor = System.Drawing.Color.Red;
LinkButton7.ForeColor = System.Drawing.Color.Red;
LinkButton8.ForeColor = System.Drawing.Color.Red;
LinkButton9.ForeColor = System.Drawing.Color.Red;
LinkButton10.ForeColor = System.Drawing.Color.Red;
LinkButton11.ForeColor = System.Drawing.Color.Red;
LinkButton12.ForeColor = System.Drawing.Color.Red;
LinkButton13.ForeColor = System.Drawing.Color.Red;
LinkButton14.ForeColor = System.Drawing.Color.Red;
LinkButton15.ForeColor = System.Drawing.Color.Red;
LinkButton16.ForeColor = System.Drawing.Color.Red;
LinkButton17.ForeColor = System.Drawing.Color.Red;
// LinkButton18.ForeColor = System.Drawing.Color.Red;
LinkButton19.ForeColor = System.Drawing.Color.Red;
LinkButton20.ForeColor = System.Drawing.Color.Red;
LinkButton21.ForeColor = System.Drawing.Color.Red;
LinkButton22.ForeColor = System.Drawing.Color.Red;
LinkButton23.ForeColor = System.Drawing.Color.Red;
LinkButton24.ForeColor = System.Drawing.Color.Red;
LinkButton25.ForeColor = System.Drawing.Color.Red;
LinkButton26.ForeColor = System.Drawing.Color.Red;
LinkButton27.ForeColor = System.Drawing.Color.Red;
// LinkButton17.ForeColor = System.Drawing.Color.Red;
}
catch (Exception)
{
}
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
try
{
if (LinkButton2.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton2.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
try
{
if (LinkButton3.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton3.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
try
{
if (LinkButton4.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton4.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton5_Click(object sender, EventArgs e)
{
try
{
if (LinkButton5.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton5.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton6_Click(object sender, EventArgs e)
{
try
{
if (LinkButton6.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton6.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton7_Click(object sender, EventArgs e)
{
try
{
if (LinkButton7.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton7.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton8_Click(object sender, EventArgs e)
{
try
{
if (LinkButton8.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton8.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton9_Click(object sender, EventArgs e)
{
try
{
if (LinkButton9.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton9.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton10_Click(object sender, EventArgs e)
{
try
{
if (LinkButton10.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton10.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton11_Click(object sender, EventArgs e)
{
try
{
if (LinkButton11.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton11.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton12_Click(object sender, EventArgs e)
{
try
{
if (LinkButton12.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton12.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton13_Click(object sender, EventArgs e)
{
try
{
if (LinkButton13.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton13.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton14_Click(object sender, EventArgs e)
{
try
{
int head = Convert.ToInt32(Session["userid"]);
Detail(head);
}
catch (Exception)
{
}
}
protected void LinkButton15_Click(object sender, EventArgs e)
{
try
{
if (LinkButton2.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton2.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton16_Click(object sender, EventArgs e)
{
try
{
if (LinkButton3.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton3.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton17_Click(object sender, EventArgs e)
{
try
{
if (LinkButton4.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton4.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton19_Click(object sender, EventArgs e)
{
try
{
if (LinkButton5.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton5.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton20_Click(object sender, EventArgs e)
{
try
{
if (LinkButton6.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton6.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton21_Click(object sender, EventArgs e)
{
try
{
if (LinkButton7.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton7.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton22_Click(object sender, EventArgs e)
{
try
{
if (LinkButton8.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton8.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton23_Click(object sender, EventArgs e)
{
try
{
if (LinkButton9.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton9.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton24_Click(object sender, EventArgs e)
{
try
{
if (LinkButton10.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton10.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton25_Click(object sender, EventArgs e)
{
try
{
if (LinkButton11.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton11.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton26_Click(object sender, EventArgs e)
{
try
{
if (LinkButton12.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton12.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton27_Click(object sender, EventArgs e)
{
try
{
if (LinkButton13.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton13.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
}
}
ASPX PAGE
-----------------------------------------------
<div>
<center>
<table>
<tr>
<td colspan="3" style="text-align:right"">
<table width="90%">
<tr>
<td colspan="3" style="text-align:center;">
<asp:LinkButton ID="LinkButton1" runat="server" Font-Underline="False"
>Lb1</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton18" Font-Underline="false" runat="server">Lb18</asp:LinkButton>
</td>
</tr>
<tr>
<td colspan="3" style="text-align:center">
<asp:Image ID="Image1" Width="600px" Height="40px" ImageUrl="~/images/arrow.png" runat="server" />
|
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:250px;">
<table width="100%">
<tr>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;"><asp:LinkButton ID="LinkButton2" runat="server" Font-Underline="False" onclick="LinkButton2_Click" >Lb2</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton15"
Font-Underline="False" runat="server" onclick="LinkButton15_Click">LinkButton</asp:LinkButton>
</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:250px;">
<table width="100%">
<tr>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;"><asp:LinkButton ID="LinkButton3" runat="server" Font-Underline="False"
onclick="LinkButton3_Click">Lb3</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton16" Font-Underline="False" runat="server" onclick="LinkButton16_Click">LinkButton</asp:LinkButton>
</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:250px;">
<table width="100%">
<tr>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;"><asp:LinkButton ID="LinkButton4" runat="server" Font-Underline="False"
onclick="LinkButton4_Click" >Lb4</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton17" Font-Underline="False" runat="server" onclick="LinkButton17_Click">LinkButton</asp:LinkButton>
</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td>
<asp:LinkButton ID="LinkButton14" runat="server" ForeColor="Red"
onclick="LinkButton14_Click"
Font-Underline="False">From Top</asp:LinkButton>
</td>
</tr>
<tr>
<td style="width:300px;">
<table width="100%">
<tr>
<td colspan="3">
<asp:Image ID="Image2" Width="250px" Height="45px" ImageUrl="~/images/arrow.png" runat="server" />
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton5" runat="server" Font-Underline="False"
onclick="LinkButton5_Click">Lb5</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton19" Font-Underline="False" runat="server" onclick="LinkButton19_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%-- <td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton6" runat="server" Font-Underline="False"
onclick="LinkButton6_Click" >Lb6</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton20" Font-Underline="False" runat="server" onclick="LinkButton20_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton7" runat="server" Font-Underline="False"
onclick="LinkButton7_Click" >Lb7</asp:LinkButton><br />
<asp:LinkButton ID="LinkButton21" Font-Underline="False" runat="server" onclick="LinkButton21_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td style="width:300px;">
<table width="100%">
<tr>
<td colspan="3">
<asp:Image ID="Image3" Width="250px" Height="45px" ImageUrl="~/images/arrow.png" runat="server" />
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton8" runat="server" Font-Underline="False"
onclick="LinkButton8_Click" >Lb8</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton22" Font-Underline="False" runat="server" onclick="LinkButton22_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%-- <td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton9" runat="server" Font-Underline="False"
onclick="LinkButton9_Click" >Lb9</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton23" Font-Underline="False" runat="server" onclick="LinkButton23_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton10" runat="server" Font-Underline="False"
onclick="LinkButton10_Click" >Lb10</asp:LinkButton>
<br /><asp:LinkButton ID="LinkButton24" Font-Underline="False" runat="server" onclick="LinkButton24_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
<td style="width:300px;">
<table width="100%">
<tr>
<td colspan="3">
<asp:Image ID="Image4" Width="250px" Height="45px" ImageUrl="~/images/arrow.png" runat="server" />
</td>
</tr>
<tr>
<td style="text-align:center">
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:left;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton11" runat="server" Font-Underline="False"
onclick="LinkButton11_Click" >Lb11</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton25" Font-Underline="False" runat="server" onclick="LinkButton25_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%-- <td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%; text-align:center;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"><asp:LinkButton ID="LinkButton12" runat="server" Font-Underline="False"
onclick="LinkButton12_Click" >Lb12</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton26" Font-Underline="False" runat="server" onclick="LinkButton26_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
<td>
<div style="width:100px;">
<table width="100%" style="padding-right:10px;">
<tr>
<%--<td style="width:15%;"> </td>
<td style="width:15%;"> </td>
<td style="width:40%;">Tarun</td>
<td style="width:15%;"> </td>
<td style="width:15%;"> </td>--%>
<td style=" text-align:left;"> <asp:LinkButton ID="LinkButton13" runat="server" Font-Underline="False"
onclick="LinkButton13_Click">Lb13</asp:LinkButton>
<br />
<asp:LinkButton ID="LinkButton27" Font-Underline="False" runat="server" onclick="LinkButton27_Click">LinkButton</asp:LinkButton>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
CS PAGE
----------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace worldhelp
{
public partial class Tree : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con1"].ConnectionString);
SqlDataAdapter da;
SqlCommand cmd;
DataTable dt;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
try
{
// Session["head"] = "2000";
if (!IsPostBack)
{
int head = Convert.ToInt32(Session["userid"]);
Detail(head);
LinkButton1.ForeColor = System.Drawing.Color.Green;
LinkButton18.ForeColor = System.Drawing.Color.Green;
}
}
catch (Exception)
{
}
}
public string showname(string uid)
{
string ss = "";
cmd = new SqlCommand("select name from register where uid=" + uid + "", con);
con.Open();
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
if (dr.Read())
{
ss = dr["name"].ToString();
}
}
con.Close();
return ss;
}
public void Detail(Int64 user)
{
try
{
blank();
LinkButton1.Text = user.ToString();
LinkButton18.Text = showname(user.ToString());
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L2 = dt.Rows[0]["lleg"].ToString();
string L3 = dt.Rows[0]["mleg"].ToString();
string L4 = dt.Rows[0]["rleg"].ToString();
if (L2 != "")
{
LinkButton2.Text = L2;
LinkButton15.Text = showname(L2);
LinkButton2.ForeColor = System.Drawing.Color.Green;
LinkButton15.ForeColor = System.Drawing.Color.Green;
Detail2(Convert.ToInt32(L2));
}
if (L3 != "")
{
LinkButton3.Text = L3;
LinkButton16.Text = showname(L3);
LinkButton3.ForeColor = System.Drawing.Color.Green;
LinkButton16.ForeColor = System.Drawing.Color.Green;
Detail3(Convert.ToInt32(L3));
}
if (L4 != "")
{
LinkButton4.Text = L4;
LinkButton17.Text = showname(L4);
LinkButton4.ForeColor = System.Drawing.Color.Green;
LinkButton17.ForeColor = System.Drawing.Color.Green;
Detail4(Convert.ToInt32(L4));
}
}
}
catch (Exception)
{
}
}
public void Detail2(Int64 user)
{
try
{
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L5 = dt.Rows[0]["lleg"].ToString();
string L6 = dt.Rows[0]["mleg"].ToString();
string L7 = dt.Rows[0]["rleg"].ToString();
if (L5 != "")
{
LinkButton5.Text = L5;
LinkButton19.Text = showname(L5);
LinkButton5.ForeColor = System.Drawing.Color.Green;
LinkButton19.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton5.Text = "Blank";
LinkButton19.Text = "Blank";
LinkButton5.ForeColor = System.Drawing.Color.Red;
LinkButton19.ForeColor = System.Drawing.Color.Red;
}
if (L6 != "")
{
LinkButton6.Text = L6;
LinkButton20.Text = showname(L6);
LinkButton6.ForeColor = System.Drawing.Color.Green;
LinkButton20.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton6.Text = "Blank";
LinkButton6.ForeColor = System.Drawing.Color.Red;
LinkButton20.Text = "Blank";
LinkButton20.ForeColor = System.Drawing.Color.Red;
}
if (L7 != "")
{
LinkButton7.Text = L7;
LinkButton21.Text = showname(L7);
LinkButton7.ForeColor = System.Drawing.Color.Green;
LinkButton21.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton7.Text = "Blank";
LinkButton7.ForeColor = System.Drawing.Color.Red;
LinkButton21.Text = "Blank";
LinkButton21.ForeColor = System.Drawing.Color.Red;
}
}
}
catch (Exception)
{
}
}
public void Detail3(Int64 user)
{
try
{
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L8 = dt.Rows[0]["lleg"].ToString();
string L9 = dt.Rows[0]["mleg"].ToString();
string L10 = dt.Rows[0]["rleg"].ToString();
if (L8 != "")
{
LinkButton8.Text = L8;
LinkButton22.Text = showname(L8);
LinkButton8.ForeColor = System.Drawing.Color.Green;
LinkButton22.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton8.Text = "Blank";
LinkButton22.Text = "Blank";
LinkButton8.ForeColor = System.Drawing.Color.Red;
LinkButton22.ForeColor = System.Drawing.Color.Red;
}
if (L9 != "")
{
LinkButton9.Text = L9;
LinkButton23.Text = showname(L9);
LinkButton9.ForeColor = System.Drawing.Color.Green;
LinkButton23.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton9.Text = "Blank";
LinkButton23.Text = "Blank";
LinkButton9.ForeColor = System.Drawing.Color.Red;
LinkButton23.ForeColor = System.Drawing.Color.Red;
}
if (L10 != "")
{
LinkButton10.Text = L10;
LinkButton24.Text = showname(L10);
LinkButton10.ForeColor = System.Drawing.Color.Green;
LinkButton24.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton10.Text = "Blank";
LinkButton24.Text = "Blank";
LinkButton10.ForeColor = System.Drawing.Color.Red;
LinkButton24.ForeColor = System.Drawing.Color.Red;
}
}
}
catch (Exception)
{
}
}
public void Detail4(Int64 user)
{
try
{
da = new SqlDataAdapter("select lleg,mleg,rleg from register where uid=" + user + "", con);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
string L11 = dt.Rows[0]["lleg"].ToString();
string L12 = dt.Rows[0]["mleg"].ToString();
string L13 = dt.Rows[0]["rleg"].ToString();
if (L11 != "")
{
LinkButton11.Text = L11;
LinkButton25.Text = showname(L11);
LinkButton11.ForeColor = System.Drawing.Color.Green;
LinkButton25.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton11.Text = "Blank";
LinkButton25.Text = "Blank";
LinkButton11.ForeColor = System.Drawing.Color.Red;
LinkButton25.ForeColor = System.Drawing.Color.Red;
}
if (L12 != "")
{
LinkButton12.Text = L12;
LinkButton26.Text = showname(L12);
LinkButton12.ForeColor = System.Drawing.Color.Green;
LinkButton26.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton12.Text = "Blank";
LinkButton26.Text = "Blank";
LinkButton12.ForeColor = System.Drawing.Color.Red;
LinkButton26.ForeColor = System.Drawing.Color.Red;
}
if (L13 != "")
{
LinkButton13.Text = L13;
LinkButton27.Text = showname(L13);
LinkButton13.ForeColor = System.Drawing.Color.Green;
LinkButton27.ForeColor = System.Drawing.Color.Green;
}
else
{
LinkButton13.Text = "Blank";
LinkButton27.Text = "Blank";
LinkButton13.ForeColor = System.Drawing.Color.Red;
LinkButton27.ForeColor = System.Drawing.Color.Red;
}
}
}
catch (Exception)
{
}
}
public void blank()
{
try
{
LinkButton1.Text = "Blank";
LinkButton2.Text = "Blank";
LinkButton3.Text = "Blank";
LinkButton4.Text = "Blank";
LinkButton5.Text = "Blank";
LinkButton6.Text = "Blank";
LinkButton7.Text = "Blank";
LinkButton8.Text = "Blank";
LinkButton9.Text = "Blank";
LinkButton10.Text = "Blank";
LinkButton11.Text = "Blank";
LinkButton12.Text = "Blank";
LinkButton13.Text = "Blank";
LinkButton15.Text = "Blank";
LinkButton16.Text = "Blank";
LinkButton17.Text = "Blank";
LinkButton18.Text = "Blank";
LinkButton19.Text = "Blank";
LinkButton20.Text = "Blank";
LinkButton21.Text = "Blank";
LinkButton22.Text = "Blank";
LinkButton23.Text = "Blank";
LinkButton24.Text = "Blank";
LinkButton25.Text = "Blank";
LinkButton26.Text = "Blank";
LinkButton27.Text = "Blank";
// LinkButton1.ForeColor = System.Drawing.Color.Red;
LinkButton2.ForeColor = System.Drawing.Color.Red;
LinkButton3.ForeColor = System.Drawing.Color.Red;
LinkButton4.ForeColor = System.Drawing.Color.Red;
LinkButton5.ForeColor = System.Drawing.Color.Red;
LinkButton6.ForeColor = System.Drawing.Color.Red;
LinkButton7.ForeColor = System.Drawing.Color.Red;
LinkButton8.ForeColor = System.Drawing.Color.Red;
LinkButton9.ForeColor = System.Drawing.Color.Red;
LinkButton10.ForeColor = System.Drawing.Color.Red;
LinkButton11.ForeColor = System.Drawing.Color.Red;
LinkButton12.ForeColor = System.Drawing.Color.Red;
LinkButton13.ForeColor = System.Drawing.Color.Red;
LinkButton14.ForeColor = System.Drawing.Color.Red;
LinkButton15.ForeColor = System.Drawing.Color.Red;
LinkButton16.ForeColor = System.Drawing.Color.Red;
LinkButton17.ForeColor = System.Drawing.Color.Red;
// LinkButton18.ForeColor = System.Drawing.Color.Red;
LinkButton19.ForeColor = System.Drawing.Color.Red;
LinkButton20.ForeColor = System.Drawing.Color.Red;
LinkButton21.ForeColor = System.Drawing.Color.Red;
LinkButton22.ForeColor = System.Drawing.Color.Red;
LinkButton23.ForeColor = System.Drawing.Color.Red;
LinkButton24.ForeColor = System.Drawing.Color.Red;
LinkButton25.ForeColor = System.Drawing.Color.Red;
LinkButton26.ForeColor = System.Drawing.Color.Red;
LinkButton27.ForeColor = System.Drawing.Color.Red;
// LinkButton17.ForeColor = System.Drawing.Color.Red;
}
catch (Exception)
{
}
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
try
{
if (LinkButton2.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton2.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
try
{
if (LinkButton3.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton3.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
try
{
if (LinkButton4.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton4.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton5_Click(object sender, EventArgs e)
{
try
{
if (LinkButton5.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton5.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton6_Click(object sender, EventArgs e)
{
try
{
if (LinkButton6.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton6.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton7_Click(object sender, EventArgs e)
{
try
{
if (LinkButton7.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton7.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton8_Click(object sender, EventArgs e)
{
try
{
if (LinkButton8.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton8.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton9_Click(object sender, EventArgs e)
{
try
{
if (LinkButton9.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton9.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton10_Click(object sender, EventArgs e)
{
try
{
if (LinkButton10.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton10.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton11_Click(object sender, EventArgs e)
{
try
{
if (LinkButton11.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton11.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton12_Click(object sender, EventArgs e)
{
try
{
if (LinkButton12.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton12.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton13_Click(object sender, EventArgs e)
{
try
{
if (LinkButton13.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton13.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton14_Click(object sender, EventArgs e)
{
try
{
int head = Convert.ToInt32(Session["userid"]);
Detail(head);
}
catch (Exception)
{
}
}
protected void LinkButton15_Click(object sender, EventArgs e)
{
try
{
if (LinkButton2.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton2.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton16_Click(object sender, EventArgs e)
{
try
{
if (LinkButton3.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton3.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton17_Click(object sender, EventArgs e)
{
try
{
if (LinkButton4.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton4.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton19_Click(object sender, EventArgs e)
{
try
{
if (LinkButton5.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton5.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton20_Click(object sender, EventArgs e)
{
try
{
if (LinkButton6.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton6.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton21_Click(object sender, EventArgs e)
{
try
{
if (LinkButton7.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton7.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton22_Click(object sender, EventArgs e)
{
try
{
if (LinkButton8.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton8.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton23_Click(object sender, EventArgs e)
{
try
{
if (LinkButton9.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton9.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton24_Click(object sender, EventArgs e)
{
try
{
if (LinkButton10.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton10.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton25_Click(object sender, EventArgs e)
{
try
{
if (LinkButton11.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton11.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton26_Click(object sender, EventArgs e)
{
try
{
if (LinkButton12.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton12.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
protected void LinkButton27_Click(object sender, EventArgs e)
{
try
{
if (LinkButton13.Text != "Blank")
{
int temp = Convert.ToInt32(LinkButton13.Text);
Detail(temp);
}
}
catch (Exception)
{
}
}
}
}
No comments:
Post a Comment