|
Guffa wrote: Response.AddHeader("Content-Disposition", "attachment; filename=\"" + file.FileName + "\"");
That's great. Let me check it..
|
|
|
|
|
i gave same reply :->
check first reply yo this thread but i think subject has relied less on me
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi
where will i add this code,,,page_load or ???
alex.
|
|
|
|
|
Malayil alex wrote: where will i add this code,,,page_load or ???
Yes.
---
single minded; short sighted; long gone;
|
|
|
|
|
You can only send information from the server to the browser using the HTTP header. It doesn't pass on the information in the next request.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi!!
I need to create window service which is a scheduler, and i need to set the scheduling parameters for the service through an asp.net page. is it possible to do the same, i mean set the parameters for the window service through ASP.net
Regards
|
|
|
|
|
|
dear all i want to create a export button in my site by which all the record for the registered user stored in user table will exports into an excel file. how could i do taht help me for the same.
i was created my site in C# language.
With regards
Yogesh Agarwal
|
|
|
|
|
You need to show data's need to be exported on a DataGrid. Say Datagrid1. Set the page response content type to excel. Using HTMLTextWriter to render the grid and write that to response. See the following code
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState =false;
System.IO.StringWriter ObjTextWriter= new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter ObjHTMLWriter= new System.Web.UI.HtmlTextWriter(ObjTextWriter);
Datagrid1.RenderControl(ObjHTMLWriter);
Hope this helps
|
|
|
|
|
|
ReportDocument rpt=new ReportDocument();
rpt.Load(Server.MapPath("ReqVsCur.rpt"));
rpt.SetDatabaseLogon("username","password");
rpt.SetParameterValue("@year",DateTime.Now.Year);
MemoryStream oStream;
oStream=(MemoryStream)rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel);
Response.Clear();
Response.Buffer=true;
Response.ContentType="application/vnd.msexcel";
Response.BinaryWrite(oStream.ToArray());
Response.End();
|
|
|
|
|
Respected Gurus
I am developing in asp.net1.1 and crystalreports.
I have some reports,developed in crystal reports which i have to export to excel.
Public Sub exportfinalreport()
Dim oStream As New MemoryStream ' // using System.IO
'this contains the value of the selected export format.
showfinalreport(dtReportdate)
oStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.Excel)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Try
Response.BinaryWrite(oStream.ToArray())
Response.End()
Catch err As Exception
Response.Write("< BR >")
Response.Write(err.Message.ToString)
End Try
End Sub
The above code successfully export data to excel.
But problem is look and feel.
Data in excel does not come under their corresponding headers,
which creates confusion.
Is there a better way to export to excel with a good look and feel.
|
|
|
|
|
Hi friends.....
i am create a data access layer using "Dataset.XSD". While retrieve and inserting date using objectdatasource I have problem with sqlserver.i got the exception “Login failed for user 'MY-PC\ASPNET'.(here my-pc is my system name).when i used sqldatasource i can acess the data.how can i handle the exception
|
|
|
|
|
check out your Sql Connection String.
best regard
pathan
|
|
|
|
|
hello !!
I have a project with me .. A namespace has 6 ".cs" files and I want to create a dll for that namespace and add to the project
As I have updated one of the .cs file now when I build the project and when i look into the dll , it does not shows any newly created dll .. why is it so . how can add a updated dll. plz hlp me out
Mrinal
|
|
|
|
|
If is web application then dll is not created by default you need to publish the your application or precompile is another option
please google the web for creating dll for web application thats how you will learn more
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi to all,
i have one problem with datagrid control. i m doing connectivity with vs.net 2005.when i fill dataset with fill() method it will generate sql exception
so tell me the solution.
Mogha Ritesh
|
|
|
|
|
Mogha Ritesh wrote: i fill dataset with fill() method it will generate sql exception
What was the exception ?
|
|
|
|
|
Hi,
Can any body tell me how to convert the asp.net user control along with it's resource file ex localization and other class files that it is using and the ascx page to a single dll??
Help Appritiated.
Do not forget to tune the Performance
Sudhir Yadav
|
|
|
|
|
Sudhir Yadav wrote: scx page to a single dll??
When you build the project which contains ASCX files, DLL will be created automatically. But to use this you need to supply the ASCX files and resource files. If you want all in a single assembly, go for Custom server controls.
|
|
|
|
|
Thanks Navneet
But i thought that there be any other solution other then custom control. Actually i was trying to avoid lengthy code to write composite controls.
If there i anything else that you know please tell.
Do not forget to tune the Performance
Sudhir Yadav
|
|
|
|
|
hello !!
I have a project with me .. A namespace has 6 ".cs" files and I want to create a dll for that namespace and add to the project
:-
I am already having dll added but i have updated one of the .cs file now when I build the project and when i look into the dll , it does not shows any newly created dll .. why is it so . how can add a updated dll . plz hlp me out
Mrinal
|
|
|
|
|
Dll will be created by the name of Application i think
is it wen application or class library
check the details it will override the existing one with same name so check the detials of that dll
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I don't find any other alternative. That's the way how ASCX files works. It's a replacement for include files in classical ASP. It needs the ASCX files to be present in the requested path. In ASP.NET 2.0 comes with WebResource concept, which allows you to embed the resources and access it with a temporary URL. I don't how much this is helpful in ASCX files. i successfully implemented that in Custom Server controls
|
|
|
|
|
Ok, thanks Navneeth,
Mean while i am trying the WebResource method of yours. Let's see what happens. I'v never done that before, so if i am having any trouble. I will bother you again bro.
Bi 4 now
Do not forget to tune the Performance
Sudhir Yadav
|
|
|
|