|
Woops! Forgot there was one of them!
|
|
|
|
|
Hi,
Can anybody please tell me how can we display an excel file in asp.net web page, not in ms-excel. in webpage itself i need to display the excel file. Please let me know if anybody is having any idea. Thanks in advance
Thanks and Regards
Venkat
|
|
|
|
|
You can read the xls file from your code then, show those data in HTML or DataGrid/Repeater or etc... just like reading data from SQL.
|
|
|
|
|
hi,
this is the code to do that, Dont forget to score it if it satisfies your need.
FileStream fileStream = new FileStream("c:\\Admin.xls", FileMode.OpenOrCreate, FileAccess.Read);
long len;
len = fileStream.Length;
Byte[] fileAsByte = new Byte[len];
fileStream.Read(fileAsByte, 0, fileAsByte.Length);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.BinaryWrite(fileAsByte);
Response.End();
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hi
Thanks for your reply. it works fine. can you give me the same for ppt files. because i tried in the same way as above. it is not working. please help me out. Thanks once again.
Thanks and Regards
Venkat
|
|
|
|
|
Hi
it is also working fine. i have given contenttype wrongly. thats why its not worked previously. now its working fine. and thanks for your help. pls be in touch with me in future also. if u dont mind can you give ur mail id (personal) so that it would be better for me. once again thanks alot.
Thanks and Regards
Venkat
|
|
|
|
|
You are most welcome.. sylvester_g_m@yahoo.com is my email id
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
Hello,
I am using Visual Studio 2003 in order to develop a setup and deployment project for a web application. Everything works fine excepting one desktop application that I have included in the setup and that have to be executed during the setup. The problem is that the setup waits for process execution and it does not complete until I close that application. The idea of the application is to stay in the system tray and not to be closed. My question is: is there a parameter that I can specify in order that the setup to do not wait for desktop application execution.
I am very familiar INNO setup and there is a flag nowait that does this trick. If anyone can point me a similarity in Visual Studio, I would appreciate it.
Thanks,
Dan.
|
|
|
|
|
hi,
this s regarding publishing the web application (c#,Asp.net.)
Currently,a website is been developed on Html, Java Script,designer tools,etc..
i want the web application (c#,Asp.net.)to be integrated on it.
so that one link in current website can open this web application.
ANY SUGGESTION.
SIncerly
shriya
|
|
|
|
|
hi..
just give link address of your asp.net application page(eg http://serveraddress/applnname/pagename.aspx ) in the html link of the html page. The asp.net page will start running when the link is clicked.
similarly in asp.net page use an html link or any link control and provide the link address of html page and the html page loads successfully.
enjoy..
|
|
|
|
|
sry,for late response,
the actual problem is .. i m not through the complete process..
i dnt know the files statistics of web application(asp.net +c#).
i had a requirment of distance calculator(i developed on c# + asp.net)in my website.
now i am not able to integrate them.[general html pages with new developed distance calculator on asp.net](dnt know the process)
Do i need to go for publishing the web application?(c# + asp.net),
thnks, shriya
|
|
|
|
|
i think may be i dint understand what u mean clearly .
is that u want to integrate and page with asp control (here the distance calculator) with and html page?
if so, you can try to keep the distance calculator application page you developed in the new asp page.
and then use iframe tag to call that asp page in the html page. i think then the asp page with the control will load once the html page is tried to open and the ouput will be rendered in a single page
...its just my idea ...i am not clear what u want
enjoy..
|
|
|
|
|
hi..
Can know the ways to send secure data like user login info,passwords,credit card info,personal details securely to and from the server. I think we can use "SSL" is it right?Can you suggest any other methods i can achieve it?
enjoy..
|
|
|
|
|
|
thank you ....i will check it..
enjoy..
|
|
|
|
|
hi...
I want to know how to use ssl or pls suggest me any links or artices on how to use ssl in asp.net application to send secure user data like user personal info, login info, passwords.
thanks for the reply in advance
enjoy..
|
|
|
|
|
|
thnks for help..i will check them..
do we find anything at msdn which is installed locally if any please say me the topic or how to find it.i tried seaching for "ssl" but i got so much useful response.
enjoy..
|
|
|
|
|
Just type "SSL" in the Index of MSDN. you will find a lot of articles. eg: How To: Set Up SSL on a Web Server, Web Application Security at Run Time and so on.
Anyway, Google is the best..
|
|
|
|
|
Hi
I have bought a new computer and then I copied my web projects from the old computer to the new one.Then I made virtual directories for these web projects using IIS.
When I want to build an asp.net 2 project(a solution contains a website and a custom library) using visual studio 2005 I got 101 messages some of them is telling me :
Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'.
When I run the project I got the error message: The website declined to show this webpage.
When I want to open another web project(asp.net 1.1) using visual studio.net 2003 its telling me that the project is on an untrusted server(I don't remember the whole message) then I clicked yes then everything is working normally with this project.
Could any one tell me what could cause all these problems to happend?
I am too late but i will never give up
|
|
|
|
|
TheEagle wrote: Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'.
Just delete that namespace and you will be fine. It's bug. See http://weblogs.asp.net/scottgu/archive/2005/12/02/432077.aspx[^]
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Thank you very much for your help...
But there is 4 error messages remain after deleting the namespace:
Could not find schema information for the element 'myCustomSectionName'
and the other three messages are about the elements and attributes that belong to this section in the configuration file.
Could you tell me how to solve this problem?.
I am too late but i will never give up
|
|
|
|
|
hi my dear friends,
i have written code for sorting a datagrid column as given below.but its not working perfectly.please check the code and help me to over come this problem.
thanks
sumith
****************************************************************
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WebApplication1.images
{
public class sort : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid DataGrid1;
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack )
{
BindGrid();
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
public void DataGrid_Page(object sender, DataGridPageChangedEventArgs e)
{
DataGrid1.CurrentPageIndex = e.NewPageIndex;
BindGrid();
}
public void DataGrid_Sort(object sender, DataGridSortCommandEventArgs e)
{
DataGrid1.CurrentPageIndex = 0;
SortField = e.SortExpression;
BindGrid();
}
protected String SortField
{
get
{
object o = ViewState["SortField"];
return (o == null) ? String.Empty : (String)o;
}
set
{
ViewState["SortField"] = value;
}
}
void BindGrid()
{
SqlConnection con3=new SqlConnection("server=localhost;Persist Security Info=False;User ID=sa;password=sa;Initial Catalog=vms_database;Data Source=server0");
string CommandText;
if(SortField == String.Empty)
CommandText = "select * from Admin_ringtone order by songname";
else
CommandText = "select * from Admin_ringtone order by" + SortField;
SqlDataAdapter ad = new SqlDataAdapter("select * from Admin_ringtone ",con3);
DataSet ds = new DataSet();
ad.Fill(ds,"Admin_ringtone");
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
}
}
}
|
|
|
|
|
SqlDataAdapter ad = new SqlDataAdapter("select * from Admin_ringtone ",con3);
chnage the above line as
SqlDataAdapter ad = new SqlDataAdapterCommandText ,con3);
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
if (flag == 0)
{
dv.Sort = e.SortExpression + " DESC";
flag = 1;
}
else
{
dv.Sort = e.SortExpression + " ASC";
flag = 0;
}
dv = dt.DefaultView;
DataGriduser.DataSource = dv;
DataGriduser.DataBind();
Sunil Tvl
|
|
|
|