Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to open word,excel,ppt file without download in browser. i am using some formula or code but did not work..

so please help me to open this document in browser...

Thanks in advance....

Mitesh
Posted
Comments
Zoltán Zörgő 10-May-12 8:34am    
It is browser dependant. But what "formula or code" have you used?
[no name] 10-May-12 8:37am    
if(e.CommandName.Equals("view")) { try { int index = System.Convert.ToInt32(e.CommandArgument); Label l1 = (Label)GridView1.Rows[index].FindControl("Label1"); Label title = (Label)GridView1.Rows[index].FindControl("Label3"); Panel1.Visible = true; frmWord.Attributes["src"] = l1.Text; } }

Mitesh, some browser doesn't support opening file without saving into clients machine so, Better to convert your file into pdf before downloading.
 
Share this answer
 
Comments
[no name] 10-May-12 8:35am    
if(e.CommandName.Equals("view"))
{
try
{
int index = System.Convert.ToInt32(e.CommandArgument);
Label l1 = (Label)GridView1.Rows[index].FindControl("Label1");
Label title = (Label)GridView1.Rows[index].FindControl("Label3");
Panel1.Visible = true;
frmWord.Attributes["src"] = l1.Text;
}
}

i want to open in iframe . pdf works fine but office document ask me to save that i not want..
AshishChaudha 10-May-12 8:37am    
it always asks your file to save...chrome does not support it..
[no name] 10-May-12 8:37am    
so what code tht convert doc,excel,ppt to pdf
Zoltán Zörgő 10-May-12 9:25am    
In Chrome you can view PDF only because there is a PDF viewer built in. If you have Office2010, you could use automation do convert files to pdf, or a pdf printer... but this is not for high load. There are enterprise level tools for that, but they are expensive.
By the way: do you want to make your solution cross-browser or for a specific one?
[no name] 11-May-12 0:15am    
i just want open word file direct without save in browser in any ways.. So please help me ...
Mitesh,

its already in cp..find link below

Convert Word-Documents to PDF on an ASP.NET Server[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900