|
Hi,
I working on a web application. In this I have to export all the data and design of the form in to a pdf file.
If anyone have idea to do this please reply me.
Thanks in advance.
|
|
|
|
|
Take a look at this[^] article. Here it shows writing HTML to PDF. You can get the HTML of you page and write that to the PDF. Hope it helps.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
how can i add a remember me component in my login form
plz help me
|
|
|
|
|
Login control comes with the remember me option. You can use that.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
|
Hi,
you can use cookie to remember login information.
modified 27-May-14 5:10am.
|
|
|
|
|
Hi
I am implementing a discussion board as a part of my web project. Can any body please let me know how I can add a controller to write messages and comment liken here in THE CODE PROJECT.
Thank You.....
ThIlInA.
|
|
|
|
|
|
|
Actually, my requirement is to download file from server to client machine without open file open, save dialog box (in silent mode).
i donot want to use ActiveXObject("ADODB.Stream") to save file client side,
and code below always show file open, save dialog box;
Response.AppendHeader("content-disposition", "inline; filename=" + strFileName);
Response.ContentType = ("application/octet-stream");
Response.BinaryWrite(byteRead);
but am really looking for silent file downlon from server to client either using web server calling from client side or something else for solution.
or
Is it possible to write " Response.WriteFile(path); " from Javascript to avoid file open, save dialog box??
thanks in advance.
|
|
|
|
|
kbsnet wrote: really looking for silent file downlon from server to client
Not possible. A client always has to accept a file to download - otherwise its known as a virus.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi all,
I have some following code:
DataTable dt = m_Data.GetInfo();
GridView1.DataSource = dt;
GridView1.DataBind();
Table dt, in fact, has 5 columns A, B, C, D, E, but I want to display just 3 columns in datagridviews A, B, C with new names A1, B1, C1. And I do not know how to do.
Have you got any suggestion for me!
Thank kiu so much!
|
|
|
|
|
Hi
When designing the page page itself you can do that.
Set the column visibility property to false.
And which all columns you want to display set the name in header of ItemTemplate. Working with Item templates, you can customise however you want
Naina
Naina
|
|
|
|
|
You can use BoundField in your gridview. Also make sure to set AutoGenerateColumns to false for your gridview.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
I sure that to do as you said I must choose a datasource & configure it when designing page, but I can not do that because my datasoucre is unknown until application runs. It is got by the following code:
public DataTable GetInfo()
{
DataTable dt = new DataTable();
try
{
SqlCommand cmd = new SqlCommand("sp_GetInfo", m_sqlConn);
cmd.CommandType = CommandType.StoredProcedure;
if(m_sqlConn.State == ConnectionState.Closed)
m_sqlConn.Open();
dt.Load(cmd.ExecuteReader(CommandBehavior.CloseConnection));
}
catch (Exception ex)
{
throw ex;
}
return dt;
}
.........
DataTable dt = m_Data.GetInfo();
GridView1.DataSource = dt;
GridView1.DataBind();
...................
|
|
|
|
|
This Can Be Done in two ways
1)Selecting only the required columns..!
2)Using the following code in
DataTable dt = m_Data.GetInfo();
GridView1.DataSource = dt;
GridView1.DataBind();
if (GridView1.Columns.Count > 0)
GridView1.Columns[0].Visible = false;
else
{
GridView1.HeaderRow.Cells[0].Visible = false;
foreach (GridViewRow gvr in GridView1.Rows)
{
gvr.Cells[0].Visible = false;
}
}
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
modified on Monday, November 30, 2009 12:56 AM
|
|
|
|
|
It worked, but how to change the header name of column A to A1 when displaying?
I have need to change name such as in original table I have a column named "AccInfo", then I must display it with the name "Account Infomation" ...
Your suggestion is highly apprecited!
|
|
|
|
|
Try this code..!
GridView1.HeaderRow.Cells[1].Text = "Account Information";
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
But you will be knowing the columns what all you are getitng from database. If you want to do the same in run time you can do that in RowDataBound().
Regards
Naina
Naina
|
|
|
|
|
Hi All
I want to place the combobox inside the datagridview and value for the combobox should come from database.
please help me with this...searched but could not find
Thanks in advance.
|
|
|
|
|
This is ASP.Net forum.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hi Venkat ,
try this article..!
http://www.xmlfox.com/datagrid_datagridview.htm[^]
But From Next Time Make Sure You posted your Question In the Right forum..
To Get more help
All the best..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
modified on Monday, November 30, 2009 12:57 AM
|
|
|
|
|
That article is for datagrid. OP is asking for DataGridView.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
I am having trouble getting my ASP search query string to
look up a field Subcategory and display a list
of matches by first character match.
so when an 'A' is entered as the search character, matches
starting with A only are displayed. The script works
for a total list , but however I modify the where/Like line
to put in the last line , the formatting falls apart,
any help much appreciated.
Thanks Bev
strSQL = "SELECT SubCategory, COUNT(*) AS myCount "_
& "FROM Products " _
& "WHERE SubCategory LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
& "GROUP BY Subcategory " _
& "Order BY Subcategory ;"
(SubCategory LIKE @SubCategory + '%')
|
|
|
|
|
Bev Robins wrote: WHERE SubCategory LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
This will look in any part of subcategory. To get results that starts with search criteria, put the search criteria first and % at the last.
Best wishes,
Navaneeth
|
|
|
|