|
|
HI,
Here is the code for exporting records in excel. Hope this will help you.
Private Sub ExportToExcel()
Dim stringWrite As IO.StringWriter
Dim htmlWrite As HtmlTextWriter
Dim frm As HtmlForm = New HtmlForm()
Response.Clear()
Response.AddHeader("content-disposition", "attachment;filename=myfile.xls")
Response.Charset = ""
Response.ContentType = "application/vnd.xls"
stringWrite = New IO.StringWriter
htmlWrite = New HtmlTextWriter(stringWrite)
BindGrid()
Controls.Add(frm)
frm.Controls.Add(grdvBuildingSWCReconciliation)
frm.RenderControl(htmlWrite)
Response.End()
end sub
Zahid Farooq
|
|
|
|
|
Zahid Farooq,
i get this error when i tried your codes : "This file is not in a recognizable format."
How can i solve this??
Thank you
jyn
modified on Thursday, August 7, 2008 10:41 PM
|
|
|
|
|
I'm also encountering this kind of warning.. the client don't want this warning message.. is there a way to get rid of this warning message?
yours truly,
hyperalergelo
|
|
|
|
|
I have already solved the problem.. try inserting this code..
Response.ContentEncoding = Encoding.GetEncoding(1252)
yours truly,
hyperalergelo
|
|
|
|
|
it works!!
thank you hyperalergelo
jyn
|
|
|
|
|
i have a report viewer inside a div tag,which has got an id,
a print button at the bottom of the form.
When i click the print button a pop up window gets opened which includes the output vales and at the same time the window's print window too gets opened which asks the printing details
after giving printing details and starting the print
MY PROBLEM
1)in the first page only the heading and the page number , page link address and current date are displayed
2) in the next page i am getting proper output of report but it even includes
i) the page link address at the bottom and
ii)the current date
iii)a thick line at bottom which is not needed
i only need the report values in the print out
Please help me
|
|
|
|
|
This is determined by the printer setup dialog - use the File/Page Setup menu option, and clear the Headers and Footers sections. This is not something you can control on other users' machines, only your own.
|
|
|
|
|
How can i change others printer options.
|
|
|
|
|
I dont think you can change printer options through asp.net code.
Another thing you could do is have a print page which contains only the information you want the user to print.
|
|
|
|
|
If u know that code pls give me
|
|
|
|
|
Hi,
I design .aspx page with WebPart Controls.
Now When I run the page I got the error that
"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances."
I want to design a page with web part control.
How can I go further?
Thanks
|
|
|
|
|
Why dont you try to correct the error message first?
|
|
|
|
|
The error comes when I run the application. I just design the page with webpart control and then run it.
|
|
|
|
|
Hi All,
I am required to switch from Integrated widows authentication to basic authentication, when the integrated authentication fails.
Does any one have any idea about the same??
Need help ASAP.
Thanks in advance.
Sudhir
Do not forget to tune the Performance
Sudhir Yadav
|
|
|
|
|
I am relatively new to programming in .net.I want to know that what is the correct way of creating an application in .net
1) create a new website on file system and do the further programming(adding pages, writing code...) etc. without creating a virtual directory
or
2) create a new website on file system, then opening IIS and creating a virtual directory and then proceed
Now the doubt is after creating a virtual directory i should open my website from file system for coding or i should open it from selecting it from local IIS (out of 4 options option from open website dialog box)
can anyone please guide me how to get started with my first website in .net????
|
|
|
|
|
Create a web application using visual studio or VWD.
Create a virtual directory and link that with the folder location on your drive.
Then start coding!
|
|
|
|
|
Most people frown on doing website/code editing from the production equipment. So any modifications you make should be done from your workstation, then transferred to the server.
This is really just a personal preference, but I find it helps to develop the good habits early.
|
|
|
|
|
How to install DotNetNuke4 for ASP.NET 2.0. Please tell me step by step procedure to install dotnetnuke.
I will be very thankful.
so please help me
nilesh kumar saraf
|
|
|
|
|
|
|
Hello Friends
Can we implements Excel financial ODDFYIELD function in c# Please Help me.
Thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
modified on Thursday, August 7, 2008 3:19 AM
|
|
|
|
|
You R posting question in a wrong Forum.
post your question on "Mathematics and Algorithms" or "c#" forum
|
|
|
|
|
I want to give the MCTS : 70-528 and 70-536 certification. I would be obliged if any one could provide me the latest dumps for the same.
-----Have A Nice Day-----
|
|
|
|
|
Search Google or Esnips.com where you can find lots of Dumps. but better if you first go with Microsoft Press Book For 70-236 and 70-528. it will realy helps you.
cheers,
Abhijit
|
|
|
|