Asp.Net

Tuesday 19 November 2013

How to get columns in the table

select *
from
INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='tblname'

Tuesday 29 October 2013

Difference between two dates in C#!!

Console Applications:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {

            DateTime d1 = DateTime.Now;
            DateTime d2 = DateTime.Now.AddDays(2);
            TimeSpan span = d2 - d1;
            Console.WriteLine("There're {0} days between {1} and {2}", span.TotalDays, d1.ToString(), d2.ToString());
            Console.ReadLine();
          
        }
    }
}

Thursday 24 October 2013

Ajax simple Example

ASPX page

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>


<asp:ToolkitScriptManager ID="kbk" runat="server"></asp:ToolkitScriptManager>
    <asp:TextBox ID="txt" runat="server"></asp:TextBox>
    <asp:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="txt" TargetControlID="txt">
</asp:CalendarExtender>


Thursday 3 October 2013

JQuery example

1st download jQuery from google i e : jquery-1.10.2.min.js

aspx.aspx:

<body>
    <form id="form1" runat="server">
    <div>
    <script src="jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="Validation.js" type="text/javascript"></script>
   
<asp:TextBox ID="txtname" runat="server"></asp:TextBox>
<asp:Button ID="btnsubmit" runat="server" />
   
    </div>
    </form>
</body>
Validation.js:

$(document).ready(function () {
    $('#btnsubmit').click(function () {
        if ($('#txtname').val() == '') {
            alert("please enter the name");
            return false;
        }
    });
});

Tuesday 1 October 2013

Navigation to the different files

1st add a file to the project, then in asp.aspx put in hyperlink button and in design part set that navigate url to the specified as below

<asp:HyperLink ID="hyp" runat="server"
            NavigateUrl="~/pdf/ASP.NET Interview Questions.doc">registration</asp:HyperLink>


Tuesday 17 September 2013

SQL Server, for selecting even and odd rows

select * from Tbl_Users where USER_ID%2=0(for even rows)
select * from Tbl_Users where USER_ID%2=1(for odd rows)

Monday 16 September 2013

Date Difference in SQL Server

SQL SERVER:
use task
create table date
(Startdate date,
Enddate date)
insert into date values('2013-01-01',GETDATE())

select * from date
select *,DATEDIFF(MONTH,Startdate,Enddate) as diffdate from date

Wednesday 11 September 2013

MS Reporting

ASPX Page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div>
            <asp:Button ID="btnDisplay" runat="server" Height="30px" Width="90px" Text="Display" OnClick="btnDisplay_Click" />
            <br />
            <rsweb:ReportViewer ID="ReportViewver1" runat="server" Height="500px" Width="1000px">
                <LocalReport ReportPath="Report.rdlc">
                    <DataSources>
                        <rsweb:ReportDataSource />
                    </DataSources>
                </LocalReport>
            </rsweb:ReportViewer>
            <br />
            <asp:Label ID="lblerrmsg" runat="server"></asp:Label>
        </div>
    </form>
</body>
</html>

MS Reportting

ASPX Page:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Reporting.WebForms;

public partial class _Default : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["HealthtipsConnectionString"].ToString());
    SqlCommand cmd;
    SqlDataAdapter da = new SqlDataAdapter();
    DataSet ds = new DataSet();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnDisplay_Click(object sender, EventArgs e)
    {
        try
        {
            con.Open();
            string str = "Select * From Tbl_Users";
            cmd = new SqlCommand(str, con);
            cmd.CommandType = CommandType.Text;
            da.SelectCommand = cmd;
            da.Fill(ds);

            if (ds.Tables[0].Columns.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ReportDataSource rds = new ReportDataSource("DataSet1", ds.Tables[0]);
                    ReportViewver1.LocalReport.DataSources.Clear();
                    ReportViewver1.LocalReport.DataSources.Add(rds);
                    ReportViewver1.LocalReport.Refresh();
                }
            }
        }
        catch (Exception ex)
        {
            lblerrmsg.Text = ex.Message;
        }
    }
}

Microsoft Reporting

Web Config file:
<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
<connectionStrings>
<add name="HealthtipsConnectionString" connectionString="Data Source=.;Initial Catalog=Healthtips;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<httpHandlers>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</httpHandlers>
<compilation debug="true"/></system.web>
</configuration>

Tuesday 3 September 2013

Nested Gridview

aspx. 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;

public partial class nestedgridview : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection("Data Source=.;Integrated Security=true;Initial Catalog=master");

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindGridview();
        }
    }
    // This method is used to bind gridview from database
    protected void BindGridview()
    {
        con.Open();
        SqlCommand cmd = new SqlCommand("select TOP 4 countryid,countryname from country", con);
        SqlDataAdapter da = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        da.Fill(ds);
        con.Close();
        gvParentGrid.DataSource = ds;
        gvParentGrid.DataBind();

    }
    protected void gvUserInfo_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            con.Open();
            GridView gv = (GridView)e.Row.FindControl("gvChildGrid");
            int countryid = Convert.ToInt32(e.Row.Cells[1].Text);
            SqlCommand cmd = new SqlCommand("select * from state where countryid="+ countryid, con);
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            con.Close();
            gv.DataSource = ds;
            gv.DataBind();
        }
    }
}

Nested Gridview

aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="nestedgridview.aspx.cs" Inherits="nestedgridview" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Gridview within Gridivew - Nested gridview example in asp.net </title>
    <script language="javascript" type="text/javascript">
        function divexpandcollapse(divname) {
            var div = document.getElementById(divname);
            var img = document.getElementById('img' + divname);
            if (div.style.display == "none") {
                div.style.display = "inline";
                img.src = "minus.gif";
            } else {
                div.style.display = "none";
                img.src = "plus.gif";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="gvParentGrid" runat="server" DataKeyNames="countryid" Width="300"
            AutoGenerateColumns="false" OnRowDataBound="gvUserInfo_RowDataBound" GridLines="None"
            BorderStyle="Solid" BorderWidth="1px" BorderColor="#df5015">
            <HeaderStyle BackColor="#df5015" Font-Bold="true" ForeColor="White" />
            <RowStyle BackColor="#E1E1E1" />
            <AlternatingRowStyle BackColor="White" />
            <HeaderStyle BackColor="#df5015" Font-Bold="true" ForeColor="White" />
            <Columns>
                <asp:TemplateField ItemStyle-Width="20px">
                    <ItemTemplate>
                        <a href="JavaScript:divexpandcollapse('div<%# Eval("countryid") %>');">
                            <img id="imgdiv<%# Eval("countryid") %>" width="9px" border="0" src="plus.gif" />
                        </a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="countryid" HeaderText="CountryId" HeaderStyle-HorizontalAlign="Left" />
                <asp:BoundField DataField="countryname" HeaderText="CountryName" HeaderStyle-HorizontalAlign="Left" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <tr>
                            <td colspan="100%">
                                <div id="div<%# Eval("countryid") %>" style="display: none; position: relative; left: 15px;
                                    overflow: auto">
                                    <asp:GridView ID="gvChildGrid" runat="server" AutoGenerateColumns="false" BorderStyle="Double"
                                        BorderColor="#df5015" GridLines="None" Width="250px">
                                        <HeaderStyle BackColor="#df5015" Font-Bold="true" ForeColor="White" />
                                        <RowStyle BackColor="#E1E1E1" />
                                        <AlternatingRowStyle BackColor="White" />
                                        <HeaderStyle BackColor="#df5015" Font-Bold="true" ForeColor="White" />
                                        <Columns>
                                            <asp:BoundField DataField="stateid" HeaderText="StateID" HeaderStyle-HorizontalAlign="Left" />
                                            <asp:BoundField DataField="statename" HeaderText="StateName" HeaderStyle-HorizontalAlign="Left" />
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>

Tuesday 27 August 2013

simple mail send

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;

public partial class Email : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SendMailtoEmployee();

    }
    public void SendMailtoEmployee()
    {
        var fromAddress = "naveenkc2@gmail.com";

        var toAddress = "naveenkc2@gmail.com";

        const string fromPassword = "naveenkc@kit";

        string subject = "Hi! Mail From Dialಮಾಡಿ.com, Your Login Details";

        string body = "  WelCome to Dialಮಾಡಿ.com";

        var smtp = new System.Net.Mail.SmtpClient();
        {
            smtp.Host = "smtp.gmail.com";
            smtp.Port = 587;
            smtp.EnableSsl = true;
            smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
            smtp.Timeout = 20000;
        }
        smtp.Send(fromAddress, toAddress, subject, body);
    }
}

password recovery

aspx page
<div style="height: 800px; width: 800px; vertical-align: middle;">
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <center>
            <asp:Panel ID="panel1" runat="server">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="EmailLabel" runat="server">E-Mail Id:</asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtEmail" runat="server" CssClass="{txtcurcomp:true,textEntry}"
                                Height="25px" BorderColor="#666666" BorderStyle="Solid" BorderWidth="1px" Font-Size="Medium"
                                Width="300px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="txtEmail"
                                CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required."
                                ValidationGroup="l1">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr id="tr1" runat="server" visible="false">
                        <td align="right">
                            <asp:Label ID="Label1" runat="server">Username:</asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtUsername" runat="server" BorderColor="#666666" BorderStyle="Solid"
                                BorderWidth="1px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr id="tr2" runat="server" visible="false">
                        <td align="right">
                            <asp:Label ID="Label2" runat="server">Password:</asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtPassword" runat="server" BorderColor="#666666" BorderStyle="Solid"
                                BorderWidth="1px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td align="left">
                            <asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="l1" Height="28px"
                                Width="100px" OnClick="btnSubmit_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            Try&nbsp;&nbsp;<asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/AgentLogin.aspx">Login</asp:LinkButton>
                            &nbsp;Again
                        </td>
                    </tr>
                </table>
                <p style="margin-left: 200px; font-family: Cambria; font-size: medium; font-weight: bold;">
                    <asp:Label ID="lblmsg" runat="server" ForeColor="Green" />
                    <asp:Label ID="lblerrmsg" runat="server" ForeColor="Red" />
                </p>
            </asp:Panel>
        </center>
    </div>

passwod recovery from email code

 aspx.cs page
protected void SendMailtoEmployee()
    {
        var fromAddress = "ekanathareddy@suviva.net";

        var toAddress = txtEmail.Text.ToString();

        const string fromPassword = "suviva123";

        string subject = "Hi! Mail From Dialಮಾಡಿ.com, Your Login Details";

        string body = "  WelCome to Dialಮಾಡಿ.com. Your Login Details are Username is :" + txtUsername.Text + " and Password is :" + txtPassword.Text + "";

        var smtp = new System.Net.Mail.SmtpClient();
        {
            smtp.Host = "smtp.gmail.com";
            smtp.Port = 587;
            smtp.EnableSsl = true;
            smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
            smtp.Timeout = 20000;
        }
        smtp.Send(fromAddress, toAddress, subject, body);
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            ds = bal.ForgottenPassword(txtEmail.Text);
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    txtUsername.Text = ds.Tables[0].Rows[0][0].ToString();
                    txtPassword.Text = ds.Tables[0].Rows[0][1].ToString();
                    SendMailtoEmployee();
                    lblmsg.Text = "Your Login Details has been sent to Your Mail Id Successfully...";
                    txtEmail.Text = string.Empty;
                }

            }
            else
                lblerrmsg.Text = "Deatails was not found.";

        }
        catch (Exception ex)
        {
            lblerrmsg.Text = ex.Message;
        }
    }

Tuesday 20 August 2013

web config file

For Isolated system:
<connectionStrings>
    <add name="Healthtips" connectionString="Data Source=.; Integrated Security=True; Initial Catalog=Healthtips" providerName="System.Data.Sqlclient"/>
   
   
   
   
  </connectionStrings>
For Server system:
<connectionStrings>
        <add name="SuvivaFreeDialConnectionString" connectionString="Data Source=MAIN;Initial Catalog=freedail;Persist Security Info=True;User ID=sa;Password=123" providerName="System.Data.SqlClient"/>
    </connectionStrings>

DAL Page

public bool logincheck(string str, SqlParameter[] param)
    {
        try
        {
            con.Open();
            cmd = new SqlCommand(str, con);
            cmd.CommandType = CommandType.StoredProcedure;
            foreach (SqlParameter par in param)
            {
                cmd.Parameters.Add(par);
            }
            dr = cmd.ExecuteReader();
            if (dr.HasRows)
            {
                return true;
            }
            else
            {
                return false;
            }

        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            con.Close();
        }
       
    }
    public bool createusers(string str, SqlParameter[] param)
    {
        try
        {
            con.Open();
            cmd = new SqlCommand(str, con);
            cmd.CommandType = CommandType.StoredProcedure;
            foreach (SqlParameter par in param)
            {
                cmd.Parameters.Add(par);
            }
            string user = Convert.ToString(cmd.ExecuteNonQuery());
            if (user.Length > 0)
            {
                return true;
            }
            else
            {
                return false;
            }

        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            con.Close();
        }
    }
    public DataSet getusers(string str, SqlParameter[] param)
    {
        try
        {
            con.Open();
            cmd = new SqlCommand(str, con);
            cmd.CommandType = CommandType.StoredProcedure;
            foreach (SqlParameter par in param)
            {

                cmd.Parameters.Add(par);
            }
            da.SelectCommand = cmd;
            da.Fill(ds);
            return ds;



        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            con.Close();
        }

BAL

BAL Page:
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Healthtips"].ToString());
    DAL dal = new DAL();
    DataSet ds = new DataSet();
    DataSet ds1 = new DataSet();
public bool logincheck(string username, string password)
    {
        try
        {
            string str = "Sp_Logincheck";
            SqlParameter[] par = new SqlParameter[2];
            par[0] = new SqlParameter("@Username", username);
            par[1] = new SqlParameter("@Password", password);
            if (dal.logincheck(str, par))
            {
                return true;

            }
            else
            {
                return false;
            }

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    public bool createusers(string userid, string name, string phonenumber, string email, string username, string password, string city, string state, string country, string gender)
    {
        try
        {
            string str = "Sp_Insertusers";
            SqlParameter[] par = new SqlParameter[10];
            par[0] = new SqlParameter("@User_Id", userid);
            par[1] = new SqlParameter("@Name",name);
            par[2] = new SqlParameter("@Phonenumber",phonenumber);
            par[3] = new SqlParameter("@Email_Id",email);
            par[4] = new SqlParameter("@Username",username);
            par[5] = new SqlParameter("@Password",password);
            par[6] = new SqlParameter("@City",city);
            par[7] = new SqlParameter("@State",state);
            par[8] = new SqlParameter("@Country",country);
            par[9] = new SqlParameter("@Gender",gender);
            if (dal.createusers(str, par))
            {
                return true;
            }
            else
            {
                return false;
            }


        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

Gridview edit delete cs page

default.aspx.cs page:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class Admin_Updatedoctors : System.Web.UI.Page
{
    BAL bal = new BAL();
    DataSet ds = new DataSet();
    protected void Page_Load(object sender, EventArgs e)
    {
        Binddata();
    }
    protected void Binddata()
    {
        try
        {
            ds = bal.getdoctors();
            gvdisplay.DataSource = ds;
            gvdisplay.DataBind();

        }
        catch (Exception ex)
        {
            lblerrmsg.Text = ex.Message;
        }
    }
    protected void gvdisplay_Click(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            Int64 str = Convert.ToInt64(e.CommandArgument);
            if (e.CommandName == "Eedit")
            {
                ds = bal.getsingledoctor(str);
                txtdoctorid.Text = ds.Tables[0].Rows[0][0].ToString();
                txtname.Text = ds.Tables[0].Rows[0][1].ToString();
                txtspecialisation.Text = ds.Tables[0].Rows[0][2].ToString();
                txtphonenumber.Text = ds.Tables[0].Rows[0][3].ToString();
                txtemail.Text = ds.Tables[0].Rows[0][4].ToString();
                txtcity.Text = ds.Tables[0].Rows[0][5].ToString();
                txtstate.Text = ds.Tables[0].Rows[0][6].ToString();
                txtcountry.Text = ds.Tables[0].Rows[0][7].ToString();
                txtgender.Text = ds.Tables[0].Rows[0][8].ToString();
                updatepnl.Visible = true;

            }
            else
            {
                lblerrmsg.Text = "cant edit";
            }

          

        }
        catch (Exception ex)
        {
            lblerrmsg.Text = ex.Message;
        }

    }
}

Gridview edit delete aspx page

Default.aspx page:
<asp:GridView ID="gvdisplay" runat="server" OnRowCommand="gvdisplay_Click" AutoGenerateColumns="false">
        <Columns>
            <asp:BoundField HeaderText="Doctor_Id" DataField="Doctor_ID" />
            <asp:BoundField HeaderText="Name" DataField="Name" />
            <asp:BoundField HeaderText="Specialisation" DataField="Specialisation" />
            <asp:BoundField HeaderText="Phonenumber" DataField="Phonenumber" />
            <asp:BoundField HeaderText="Email_Id" DataField="Email_ID" />
            <asp:BoundField HeaderText="City" DataField="City" />
            <asp:BoundField HeaderText="State" DataField="State" />
            <asp:BoundField HeaderText="Country" DataField="Country" />
            <asp:BoundField HeaderText="Gender" DataField="Gender" />
            <asp:TemplateField HeaderText="Select Action">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkedit" runat="server" CommandArgument='<%#Bind("Doctor_Id") %>'
                        CommandName="Eedit">edit</asp:LinkButton>
                    <asp:LinkButton ID="lnkdelete" runat="server" CommandArgument='<%#Bind("Doctor_Id") %>'
                        CommandName="Edelete">Delete</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:Panel ID="updatepnl" runat="server" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Label ID="lbldoctorid" runat="server" Text="Doctor id"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtdoctorid" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblname" runat="server" Text="Name"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblspecialisation" runat="server" Text="Specialisation"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtspecialisation" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblphonenumber" runat="server" Text="phonenumber"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtphonenumber" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblemail" runat="server" Text="Email"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtemail" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblcity" runat="server" Text="City"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtcity" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblstate" runat="server" Text="State"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtstate" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblcountry" runat="server" Text="Country"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtcountry" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblgender" runat="server" Text="Gender"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtgender" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>
    </asp:Panel>