aspx page code..>>>>>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NI_AD_USER_MST_REPORT1.aspx.cs" Inherits="NIPL.NIPL.htmlreport.NI_AD_USER_MST_REPORT11" %>
<!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> user master</title>
<style type="text/css">
.devanagriBi
{
font-family:Suchi-Dev-0708W;
font-size: 25pt;
height:50;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html
>
businesslayer code...>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
namespace NIPL.AppCode
{
public class cBLayerusermst
{
DBFunctions cdbLayer;
SqlConnection con;
//string NI_AD_QUERY = "";
public cBLayerusermst()
{
cdbLayer=new DBFunctions();
}
//SqlDataAdapter da;
public Boolean NI_AD_USER_MST(int intuserid, out DataSet dsUserMst)
{
con = cdbLayer.GetDatasetConnection();
SqlDataAdapter da = new SqlDataAdapter("[dbo].[USER_MST_SP]", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters.AddWithValue("@NI_ADUM_USER_ID", intuserid).Value=2;
DataSet dsout = new DataSet();
da.SelectCommand.CommandTimeout = 3600;
da.Fill(dsout, "[dbo].[USER_MST_SP]");
dsUserMst = dsout;
con = cdbLayer.CloseConnection();
return true;
}
}
}
STORE PROCEDURE CODE...>>>>>
USE EMPLOYEE1
GO
ALTER PROCEDURE dbo.USER_MST_SP(
@NI_ADUM_USER_ID INT)
AS
BEGIN
SELECT *FROM nipl.NI_AD_USER_MST WHERE NI_ADUM_USER_ID=@NI_ADUM_USER_ID
END
ASPX.CS PAGE CODE.....>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
using NIPL.AppCode;
using System.Data.OleDb;
using System.Text;
namespace NIPL.NIPL.htmlreport
{
public partial class NI_AD_USER_MST_REPORT11 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["EMPLOYEE1ConnectionString"].ToString());
// public string NI_AD_USER_MST = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
con.Open();
int intuserid = 2;
//string NI_AD_QUERY = "";
cBLayerusermst UM = new cBLayerusermst();
// HEADER
//string NI_ADUM_ENTITY_ID = Request.QueryString["Entity Id"];
//string NI_ADUM_USER_ID = Request.QueryString["User Id"];
////string NI_Entity_ID = Session[NI_SessionClass.NI_SS_ENTITYID].ToString();
//string NI_ADUM_USER_NAME = Request.QueryString["User Name"];
//string NI_ADUM_USER_EMAIL = Request.QueryString["Email Id"];
//string NI_ADUM_USER_PAN = Request.QueryString["Pan"];
//string NI_ADUM_USER_DEPT_NAME = Request.QueryString["Dept. Name"];
//string NI_ADUM_REGISTER_DATE = Request.QueryString["Register Date"];
SqlCommand cmd;
//SqlDataReader ad;
//Response.Write("/br");
//Response.Write("</br>");
//Response.Write("</br>");
//Response.Write("</br>");
//Response.Write("</br>");
//Response.Write("</br>");
Response.Write("<TABLE border=1 cellspacing='0' cellpadding='0' width='100%'> ");
Response.Write("<tr>");
Response.Write("<th class=\"title1\" width=\"12%\" align='center'>Entity Id</th>");
Response.Write("<th class=\"title1\" width=\"12%\" align='center'>User Id</th>");
Response.Write("<th class=\"title1\" width=\"15%\" align='center'>USER NAME</th>");
Response.Write("<th class=\"title1\" width=\"17%\" align='center'>USER EMAIL ID</th>");
Response.Write("<th class=\"title1\" width=\"15%\" align='center'>USER PAN NO.</th>");
Response.Write("<th class=\"title1\" width=\"15%\" align='right'>USER DEPT. NAME</th>");
Response.Write("<th class=\"title1\" width=\"20%\" align='center'>REGISTER DATE</th>");
Response.Write("</tr>");
//NI_AD_QUERY = "SELECT NI_ADUM_ENTITY_ID,NI_ADUM_USER_ID,NI_ADUM_USER_NAME,NI_ADUM_USER_EMAIL,NI_ADUM_USER_PAN,NI_ADUM_USER_DEPT_NAME, NI_ADUM_USER_REGISTER_DATE FROM nipl.NI_AD_USER_MST ";
// NI_AD_QUERY = "[dbo].[USER_MST_SP] ";
//cmd = new SqlCommand(NI_AD_QUERY, con);
DataSet ds = new DataSet();
UM.NI_AD_USER_MST(intuserid, out ds);
//ad = cmd.ExecuteReader();
int i = 0;
while (i < ds.Tables[0].Rows.Count)
{
Response.Write("<tr>");
Response.Write("<td width=\"15%\" align='left'>" + ds.Tables[0].Rows[i][0].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][1].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][2].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][3].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][4].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][5].ToString() + "</td>");
Response.Write("</tr>");
//intuserid = intuserid + int.Parse(ds.Tables[0].Rows[i][0].ToString());
//i++;
}
Response.Write("</Table>");
// Response.Write("</tr>");
//Response.Write("/Table");
//while (ad.Read())
//{
// Response.Write("<tr>");
// Response.Write("<td width=\"12%\" align=\"left\" > " + ad.GetValue(0).ToString() + "</td>");
// Response.Write("<td width=\"12%\" align=\"left\" > " + ad.GetValue(1).ToString() + "</td>");
// //Response.Write("<td width=\"25%\" align=\"left\" > </td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"15%\" align=\"left\" > " + ad.GetValue(2).ToString() + "</td>");
// Response.Write("<td width=\"17%\" align=\"left\" > " + ad.GetValue(3).ToString() + "</td>");
// //Response.Write("<td width=\"25%\" align=\"left\" > </td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// //Response.Write("<strong><font face='Suchi-Dev-0708W' size='4'>");
// ////Response.Write("®â³âå®âû - 5/Form - 5");
// //Response.Write("<td width=\"25%\" align=\"left\" colspan='2' ><strong><font face='Suchi-Dev-0708W' size='4'> " + ad.GetValue(2).ToString() + "</td>");
// //Response.Write("</font></strong>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"15%\" align=\"left\" > " + ad.GetValue(4).ToString() + "</td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"15%\" align=\"left\" > " + ad.GetValue(5).ToString() + "</td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"20%\" align=\"left\" > " + ad.GetValue(6).ToString() + "</td>");
// Response.Write("</tr>");
//}
//ad.Close();
}
catch (Exception eNI)
{
Response.Write(eNI.Message);
}
finally
{
con.Close();
}
}
}
}
}
I m not getting the output in html of selected userid .