Advertise with us
Control Panel
Forum
Hosting Help
ASP.NET 4.5 & SQL 2012 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
Home
»
Questions & Answers
»
open word file or other file in new window
open word file or other file in new window
21 Apr, 12
Author:
Mitesh S Machhi
Fairmate Chemical Pvt.Ltd
i am using the gridview row command property but i want to open file in window when i clicked on View command button..
code is: -
Collapse | Copy Code
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.Equals(view))
{
int index = System.Convert.ToInt32(e.CommandArgument);
Label l1 = (Label)GridView1.Rows[index].FindControl(Label1);
Response.Redirect(l1.Text);
}
}
in l1 the path of document is save but it open in same window when PDF file is but i want to open PDF file or word,excel etc... in new window using coding... It automatically download that i not want. i want to open file not save...
plz help me...
Thanksss
Mitesh
Answers .............
Author:
Nishanth Mohan
Posted Date: 23 Apr, 12
You have to change the logic here. You can do in 2 ways
1. Use a hyperlink in the grid view column, set the target as _blank
2. Use a hyperlink, open the file using javascript:window.open
Author:
Drake Forman
Posted Date: 10 Jan, 13
Open, view and so on with word files with the aid of word repair tool
http://www.word2007repair.wordrepairtoolbox.com
supports MS Windows 98/.../7 and MS Word 95/.../2010
You must
login
to post answer for this question.
Total
members
:
250637
Average new registrations per day (in last 7 days):
7
New Registration:
Open
Register Now
Talk to Webmaster
Tony John
Facebook
Google+
Twitter
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.