Click here to Skip to main content
14,634,946 members

Comments by Pradeep_kaushik (Top 52 by date)

Pradeep_kaushik 17-Dec-12 1:28am View
   
it the same as is it no change is there
Pradeep_kaushik 9-Dec-12 1:43am View
   
Deleted
my apsx page is like this

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Invoice.aspx.cs" Inherits="Default3" %>

<!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>Untitled Page</title>
<style type="text/css">
@media print {
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
}
@media screen{
thead { display: block; }
tfoot { display: block; }
}
.style1
{
width: 100%;
}
.style3
{
font-size: large;
}
.style4
{
font-family: Arial;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:Panel ID="Panel1" runat="server">
<table class="style1">
<thead>
<tr>
<td class="style3" colspan="2" rowspan="4" valign="top">
JAI MATA DI</td>
<td>
<span class="style4">Invoice No.</span><br />
<asp:Label ID="Label3" runat="server">
</td>
<td>
Dated<br />
<asp:Label ID="Label4" runat="server">
</td>
</tr>
<tr>
<td>
 </td>
<td>
 </td>
</tr>
<tr>
<td>
 </td>
<td>
 </td>
</tr>
<tr>
<td>
 </td>
<td>
 </td>
</tr>
<tr>
<td class="style4" colspan="2" rowspan="4" valign="top">
Consignee<br />
<asp:Label ID="Label1" runat="server">
<br />
<asp:Label ID="Label2" runat="server">
</td>
<td>
 </td>
<td>
 </td>
</tr>
<tr>
<td>
 </td>
<td>
 </td>
</tr>
<tr>
<td>
 </td>
<td>
 </td>
</tr>
<tr>
<td>
 </td>
<td>
 </td>
</tr></thead>
<tr>
<td colspan="4">
<asp:GridView ID="GridView1" runat="server" GridLines="Vertical" Width="100%" ShowFooter="true"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
onrowdatabound="GridView1_RowDataBound">
<columns>
<asp:BoundField DataField="DESCR" HeaderText="Description" SortExpression="DESCR" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="PCODE" HeaderText="Pcode" SortExpression="PCODE" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="SIZE" HeaderText="Size" SortExpression="SIZE" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="QUANT" HeaderText="Quantity(Pcs.)" SortExpression="QUANT" ItemStyle-HorizontalAlign="Center"
Pradeep_kaushik 9-Dec-12 1:35am View
   
can explain little bit how can i use it
Pradeep_kaushik 4-Dec-12 12:14pm View
   
DateTime dt = Convert.ToDateTime(TextBox5.Text).Date;

its not working
Pradeep_kaushik 4-Dec-12 11:49am View
   
ok but now it takes time also how can i insert only date
Pradeep_kaushik 4-Dec-12 9:39am View
   
i use this query but the output is 28 and 29 it compair only date not month and year
Pradeep_kaushik 4-Dec-12 9:38am View
   
i use this query but the output is 28 and 29 it compair only date not month and year
Pradeep_kaushik 20-Nov-12 2:44am View
   
on the same page i want to print
Pradeep_kaushik 23-Oct-12 7:55am View
   
how can i do that
Pradeep_kaushik 16-Oct-12 6:59am View
   
thanx sir.....
Pradeep_kaushik 15-Oct-12 7:39am View
   
my question is just like the description in the below answer but want this format for only last three updating dates
and i am using this query in my project through the in build sqlserver of VS2008
Pradeep_kaushik 15-Oct-12 7:31am View
   
thanks But I want Price for only last three updated dates
Pradeep_kaushik 5-Oct-12 4:59am View
   
output just like
product name-----1/5/2012-----1/6/2012----1/7/2012
2 steel pin--------56-----------60----------70
hook---------------30-----------34-----------40
and more products
Pradeep_kaushik 26-Sep-12 2:55am View
   
ok thanks
Pradeep_kaushik 26-Sep-12 2:52am View
   
this event is not shown in my event window
Pradeep_kaushik 26-Sep-12 2:39am View
   
Deleted
is Leave automatic method or i have to create manually
Pradeep_kaushik 13-Sep-12 7:22am View
   
i am not sure but you can try the event between
if(!ispostback)
{
---- your code
} on page load
Pradeep_kaushik 7-Sep-12 5:45am View
   
Deleted
RequiredFieldValidator reqif = new RequiredFieldValidator();
reqif.ID = "reqif";
reqif.ControlToValidate = txt2.ID;
reqif.ErrorMessage = "Enter no. flats";
pnlInfo.Controls.Add(reqif);
Pradeep_kaushik 7-Sep-12 2:02am View
   
I do this and this works perfactly

Button btnSubmit = new Button();
btnSubmit.ID = "button";
btnSubmit.Text = "Submit ";
btnSubmit.Height = 80;
btnSubmit.Width = 80;
btnSubmit.Click += new System.EventHandler(btnSubmit_click);
pnlInfo.Controls.Add(btnSubmit);
Pradeep_kaushik 7-Sep-12 1:45am View
   
try when you creating event
btnContinue.Click += new System.EventHandler(btnContinue_Click);
Pradeep_kaushik 30-Aug-12 5:43am View
   
can you explain it with the help of my code
Pradeep_kaushik 30-Aug-12 5:39am View
   
i m using this code for creating text boxes

for (int i = 1; i <= a; i++)
{
int c = b + i;
Label lbl = new Label();
lbl.ID = Convert.ToString(b + i);
lbl.Text = "flat no."+ c;
lbl.Width = 70;



Label lbl1 = new Label();
lbl1.ID = "lbl1" + i+100;
lbl1.Text = "Size(Sq.ft)";
lbl1.Width = 70;

pnlInfo.Controls.Add(new LiteralControl("   "));

TextBox txt = new TextBox();
txt.ID = "txt" + i;
txt.Width = 70;


pnlInfo.Controls.Add(new LiteralControl("   "));

Label lbl2 = new Label();
lbl2.ID = "lbl2" + i+1000;
lbl2.Text = "type";
lbl2.Width = 70;

pnlInfo.Controls.Add(new LiteralControl("   "));

TextBox txt1 = new TextBox();
txt1.ID = "text1" + i;
txt1.Width = 70;

pnlInfo.Controls.Add(lbl);
pnlInfo.Controls.Add(new LiteralControl("  "));
pnlInfo.Controls.Add(lbl1);
pnlInfo.Controls.Add(new LiteralControl("  "));
pnlInfo.Controls.Add(txt);
pnlInfo.Controls.Add(new LiteralControl("  "));
pnlInfo.Controls.Add(lbl2);
pnlInfo.Controls.Add(new LiteralControl("  "));
pnlInfo.Controls.Add(txt1);

pnlInfo.Controls.Add(new LiteralControl("<br />"));


Button2.Visible = true;




and this for updating data


protected void Button2_Click(object sender, EventArgs e)
{
int b=Convert.ToInt32(DropDownList3.SelectedItem.Text);
b=b*100;
int a = Convert.ToInt32(Label2.Text);
for (int i = 1; i <= a; i++)
{
TextBox txtsize = (TextBox)pnlInfo.FindControl((Convert.ToString("txt" + i)));

TextBox txttype = (TextBox)pnlInfo.FindControl("text1"+i);


SqlCommand cmd = new SqlCommand("update flatconfig set size='" + txtsize.Text + "',type='" + txttype.Text + "' where town='" + DropDownList1.SelectedItem.Text + "' and tower='" + DropDownList4.SelectedItem.Text + "' and floor='" + DropDownList3.SelectedItem.Text + "' and flatno='" + 1 + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
}
Pradeep_kaushik 21-Aug-12 3:59am View
   
want to reduce the number of images
Pradeep_kaushik 21-Aug-12 3:53am View
   
ok thank u
Pradeep_kaushik 21-Aug-12 3:52am View
   
is there another method to do that
Pradeep_kaushik 21-Aug-12 3:42am View
   
thanx for your rply but i have 10 floors images and each image have 30 hot spots than how many images i have to use
Pradeep_kaushik 18-Aug-12 2:35am View
   
thanx...
Pradeep_kaushik 18-Aug-12 1:19am View
   
is any liberary required for it ?

it gives an error

"Object reference not set to an instance of an object." on line label.text-----
Pradeep_kaushik 6-Aug-12 4:45am View
   
but i also want to change the color of that spot when i click on that
Pradeep_kaushik 6-Aug-12 4:45am View
   
but i also want to change the color of that spot when i click on that
Pradeep_kaushik 25-Jul-12 7:44am View
   
ok sir thanx
Pradeep_kaushik 25-Jul-12 7:36am View
   
its nvarchar
Pradeep_kaushik 25-Jul-12 7:28am View
   
it gives an error

Arithmetic overflow error converting expression to data type datetime.
Pradeep_kaushik 25-Jul-12 7:05am View
   
here is the code

protected void Button1_Click1(object sender, EventArgs e)
{
DateTime dt1 = Convert.ToDateTime(TextBox1.Text);
DateTime dt2 = Convert.ToDateTime(TextBox2.Text);
con.Open();

SqlDataAdapter da = new SqlDataAdapter("select 'Ch.No'=SNO,'Date'=DATE,'Particulars'=PNAME,'Qty'=QUANT,'Rate'=RATE,'Amount'=TOTAL,'Balance'=BALANCE from BILL1 where CNAME='" + DropDownList1.SelectedItem.Text + "' and DATE between '" + dt1.ToShortDateString() + "' and '" + dt2.ToShortDateString() + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();
Button3.Visible = true;
}
Pradeep_kaushik 25-Jul-12 7:04am View
   
yes i m creating an sql statement
Pradeep_kaushik 25-Jul-12 1:57am View
   
its working but i want to fetch the whole row and want to insert those values in a new table


this example working for only cell
Pradeep_kaushik 24-Jul-12 2:10am View
   
thanx sir
it gives an error

Index was out of range. Must be non-negative and less than the size of the collection.

i recently join a comp as fresher so i m facing problems
Pradeep_kaushik 24-Jul-12 1:57am View
   
no sir i m not testing any one
i want to generate a bill by the filtration of two dates i ave some field in a table
but client requires a special format beside the total column he wants another column called balance that contains the value like first value equal to the first value of the total and the second value is equal to the addition of first and 2nd value of total column and so on.....
Pradeep_kaushik 24-Jul-12 1:28am View
   
now how can i insert 'b' in grid view column
Pradeep_kaushik 24-Jul-12 1:00am View
   
thanx its working

now i want that the array size is automatically declared according to the dr.
and a column created at run time in my grid view and array b's value inserted in that column
Pradeep_kaushik 24-Jul-12 0:36am View
   
It gives an error

Error 4 'ordermanagement.BILL3.b' is a 'field' but is used like a 'type'
Pradeep_kaushik 21-Jul-12 7:27am View
   
i explain in solution section on solution 3

SqlDataAdapter da=new SqlDataAdapter("select SNO,DATE,PNAME,QUANT,RATE,TOTAL from BILL1 where CNAME='"+Label1.Text+"' and DATE between '" + dt1.ToShortDateString() + "' and '" + dt2.ToShortDateString() + "'",con);
DataSet ds=new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();

/////////////
con.Open();
SqlCommand cmd = new SqlCommand("select SNO,DATE,PNAME,QUANT,RATE,TOTAL from BILL1 where CNAME='" + Label1.Text + "' and DATE between '" + dt1.ToShortDateString() + "' and '" + dt2.ToShortDateString() + "'", con);

SqlDataReader dr1 = cmd.ExecuteReader();
while (dr1.Read())
{


a += Convert.ToDecimal(dr1["TOTAL"].ToString());
// SqlConnection con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["order"].ConnectionString);
// SqlCommand cmd1 = new SqlCommand("update BILL1 set BALANCE=" + a + "", con1);
// con1.Open();
// cmd1.ExecuteNonQuery();
// con1.Close();

}
Label5.Text = a.ToString();
Label6.Text = a.ToString();
con.Close();

}

protected void Button1_Click(object sender, EventArgs e)
{
Page.RegisterStartupScript("PrintPage", "<script language='javascript'>window.print()</script>");
}

protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("GENERATEBILL2.aspx");
}
Pradeep_kaushik 21-Jul-12 6:05am View
   
i gave the description in solution window now can u pls help me
Pradeep_kaushik 21-Jul-12 3:31am View
   
sir you giving this code for VS2010 or VS 2008
Pradeep_kaushik 19-Jul-12 8:04am View
   
Type 'System.Web.UI.WebControls.GridView' does not have a public property named 'TemplateColumn'. error message is displayed at line
<asp:TemplateColumn HeaderText="Balance">
i write
<asp:GridView ID="GridView1" runat="server" Width="453px" >
<asp:TemplateColumn HeaderText="Balance">
<asp:Label id="lblBalance" runat="server" Text="" />

Pradeep_kaushik 19-Jul-12 7:26am View
   
can u pls give me the instruction how can i add that
Pradeep_kaushik 19-Jul-12 7:23am View
   
i have to add the balance column in my table ??
or in gridview
Pradeep_kaushik 19-Jul-12 7:07am View
   
i have to generate a bill in a project
in my data base there is no column of named balance total column is there
but i want that at run time by adding values of total column as i explain in example
Pradeep_kaushik 19-Jul-12 7:02am View
   
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[7].Text = (Convert.ToInt32(GridView1.Rows[e.Row.RowIndex - 1].Cells[6].Text) + Convert.ToInt32(e.Row.Cells[6].Text)).ToString();
}
}
Pradeep_kaushik 19-Jul-12 6:45am View
   
its not working
Pradeep_kaushik 18-Jul-12 4:03am View
   
when i give this code

SqlDataAdapter da = new SqlDataAdapter("select SNO,DATE,PNAME,QUANT,RATE,TOTAL from BILL1 where CNAME='"+Label1.Text+"' and DATE between Convert(datetime, '"+ Label3.Text +"',110) and Convert(datetime, '"+ Label4.Text +"',110)",con);

error message displayed :-
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

when i use the code
SqlDataAdapter da=new SqlDataAdapter("select SNO,DATE,PNAME,QUANT,RATE,TOTAL from BILL1 where CNAME='"+Label1.Text+"' and DATE between '" + dt1.ToShortDateString() + "' and '" + dt2.ToShortDateString() + "'",con);

it does not compare year if i give two dates of 2012 n any entry with 2013 year also displayed
Pradeep_kaushik 18-Jul-12 4:00am View
   
name is user name or client name