|
hi,
how to open word document in asp.net??
for example when i trigger in button its showing word application.
it is possible ???...
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
|
As Far as my understanding..!
You want to display the word document in your application..!
is it right?
If yes..!
Copy and paste the word document in the server.Map Path
give the link to the word doc..!
<coderesponse.rediect("your word="" doc");="">
If the MS Office Is installed in your System..!
It will show the word doc..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
thanks for valuable reply....
i got solution for this...
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
KaNNaN.JC wrote: i got solution for this
Y dont u share with all may be it will helpful to others..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
if( Request.QueryString["strFile"] != null )
{
string strFilePath1="";
string strFileName = Request.QueryString["strFile"].ToString();
strFilePath1=Request.PhysicalApplicationPath+"/BackOffice/Catalogue/UploadFiles/"+strFileName;
if(strFileName!="")
{
Response.ContentType=strFilePath1;
Response.AddHeader("content-disposition", "attachment;filename="+strFileName);
Response.WriteFile(strFilePath1);
}
}
http://himabinduvejella.blogspot.com
"If you can dream IT, you can become IT"
|
|
|
|
|
Hi,
How we can download multiple files in one go, But not in zip format.
Waiting for reply.
krishna veer singh
|
|
|
|
|
Create dynamic IFRAMES (hidden ones) filling those URLs. However remember that your web browser would limit downloads to two connections per domain.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Can you please let me know the exact scenarios, so that we can give you better solution .
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Actually the thing is that, I'm displaying multiple files in a page with check box option. so that if any one check three(for ex.) of them and click on the download button. Then all the three images should get download.
krishna veer singh
|
|
|
|
|
|
Hi Abhijit,
Is it possible to download the files without zip?
krishna veer singh
|
|
|
|
|
hi, follow the link below,it will help you a lot.
http://www.webdeveloper.com/forum/showthread.php?t=100258
modified 27-May-14 4:58am.
|
|
|
|
|
hey world,
i have created a crystal report by sending parameter fields.And it works fine.And i use some multi-line text boxes to get relevant data to those fields.
The problem began from here.if the data entered gets bigger the crystal report field doesn't expand,and will not show the entire data but show only some of it.
it can be solve by expanding the field manually,but it will cause another problem.
Stretching report after limited extend,the report display nothing.but i need some more space.but when i get it by Stretching it will not show the data.
Plz i need help quick.
thanks in advance.
|
|
|
|
|
In my web.config, and I'm using IIS 7 and ASP.net 3.5.
<customErrors mode="on" defaultRedirect="Oops.aspx" />
This does not send me to the error page. It show a generic page like when mode = "RemoteOnly".
Why is this?
|
|
|
|
|
If I'm not wrong, I think you must specify the full path like so
<customErrors mode="on" defaultRedirect="~/Oops.aspx" />
HTH!
|
|
|
|
|
I have tried that.
Do I need to change something in IIS?
|
|
|
|
|
I don't remember making changes on IIS 6, but I've no idea about IIS7.
|
|
|
|
|
Hi guys,
I am new to the ASP.NET framework and was wondering if you could help me out a little bit please!
I am using the ASP.NET MVC framework. I have a controller file for home, HomeController.cs and a aspx file under the Home directory.
My question is - if I have an element (say a label) in my Index.aspx (under Home directory) file - is there a way to access it from the HomeController.cs file? I have seen a tutorial simply use the id of the element to access it - but this doesn't work for me.
Is there a proper way to access form elements (or elements in general) directly from the controller file?
<asp:Label id="lblMessage" Text=" " runat="server" />
lblMessage.Text = message;
Thank you very much for your help!
Xav.
|
|
|
|
|
I'm no expert in MVC but, my understanding is that controller and view should have the same name. But that's just my understanding and I could be wrong.
HTH!
|
|
|
|
|
Hi,
Thank you for your reply!
They are correctly matched and all - just cannot seem to see any elements coming up on the view page ![Frown | :(](https://www.codeproject.com/script/Forums/Images/smiley_frown.gif)
|
|
|
|
|
Hi,
To this in Asp.Ne MVC, i think it's really hard but you can also look at "ViewPage" class.
However you can use the View Code behind like this:
- Add a new class in Controllers "Index.cs"
namespace MvcApplication1.Controllers
{
public partial class Index : ViewPage
{
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Label lbl= (Label)this.FindControl("lblMessage");
lbl.Text = "Yahoooo!";
}
}
}
- Open your View (in this example is Index.aspx) and update the derectives page:
<%@ Page Language="C#" Inherits="MvcApplication1.Controllers.Index" CodeBehind="~/Controllers/Index.cs"%>
as you can see, you specify the CodeBehind class and you Inherit from it (like the Old asp.net)
- Add this method in the "HomeControler" Class:
public ViewResult Index()
{
return View();
}
Good luck.
Kadaoui El Mehdi
|
|
|
|
|
I m using web service of third psrty.when i using this from devlopement server,it work fine but when i host on web server,then i got problem which given below:
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A socket operation was attempted to an unreachable host 202.54.158.89:80 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at BSWS.BSWS.SubmitSMS(String strID, String strPwd, String strPhNo, String strText, String strSchedule, Int32 intRetryMin, String strSenderID, String strSenderNo) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\395905b2\d466df68\App_WebReferences.aq-glseu.0.cs:line 147 at Default2.SendSMSUsingBS(String strUser, String strPassword, String strRecip, String strMsgText, String strSMSScheduleDate) in d:\whb\Sites\19229\Web\Default2.aspx.cs:line 91 at Default2.sendSMS() in d:\whb\Sites\19229\Web\Default2.aspx.cs:line 77 at Default2.Button1_Click(Object sender, EventArgs e) in d:\whb\Sites\19229\Web\Default2.aspx.cs:line 42
|
|
|
|
|
An aspx page called Default2.aspx tried to process Button1 click event. It has tried to connect via SOAP protocol to the host 202.54.158.89:80 to send an SMS. But the connection was denied.
Something like firewall can cause this problem by blocking a connection.
|
|
|
|
|
Adding to Dmitry's comments -
To confirm it, just try connecting to the host at 202.54.158.89:80 using a browser from your live server.
|
|
|
|