16,004,587 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Harshad Kathiriya (Top 36 by date)
Harshad Kathiriya
7-Mar-16 7:45am
View
did you tried with utf-16?
Harshad Kathiriya
7-Jul-15 1:51am
View
Do you debug the code? Find which object is not initialized.
Harshad Kathiriya
15-May-15 7:36am
View
May be below link will help you
http://geekswithblogs.net/Frez/archive/2010/05/17/preventing-a-user-from-having-multiple-concurrent-sessions.aspx
Harshad Kathiriya
15-May-15 5:26am
View
It may be cause an issue related to Start and Stop Thread.
As per your code, you have started the thread but not stopped it.
revise your code.
Harshad Kathiriya
14-May-15 7:13am
View
is there large amount data bind with Datatable ?
Harshad Kathiriya
25-Sep-14 3:47am
View
how to set connection string in config file?
Harshad Kathiriya
25-Sep-14 3:44am
View
Post the error here
Harshad Kathiriya
4-Sep-13 7:24am
View
just do one thing. first to create new page to your application and match the page directive in ASPX page and namespace in CS file with copied page. u definitely got the solution.
Harshad Kathiriya
4-Sep-13 7:03am
View
third party site can't give u the rights for direct login. U need to use api for that site. Becoz of security reason.
Harshad Kathiriya
4-Sep-13 7:01am
View
use the FileStream.
Harshad Kathiriya
4-Sep-13 2:27am
View
Other site is developed by u or some third party ?
Harshad Kathiriya
4-Sep-13 1:59am
View
need more description, what actually u want ?
Harshad Kathiriya
24-Jul-13 3:43am
View
welcome :)
will rock
Harshad Kathiriya
24-Jul-13 3:24am
View
That's good.
u got the solution..
:)
If anything I found for crystal report, I will send to you on mail...
Harshad Kathiriya
24-Jul-13 2:59am
View
Hey try to do this..
--- CHTML file
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>Index</title>
<script type="text/javascript">
function ShowPDF() {
var myFilepath = document.getElementById('myFilepath');
window.open(myFilepath.value, 'SalesReport', "resizable=yes,scrollbars=yes,status=yes", 465, 255);
}
</script>
</head>
<body önload="javascript:ShowPDF();">
<div>
@*<iframe width="90%" height="90%" önloadeddata="ShowPDF()">
</iframe>*@
<input type="hidden" id="myFilepath" value='@ViewData["Message"]' />
</div>
</body>
</html>
-- Controller file
public ActionResult Index()
{
string fileName = Server.MapPath(@"~\HTP.pdf");
ViewData["Message"] = "http://localhost:1463/HTP.pdf";
return View();
}
set your url path into web config and access that as the place of http://LocalHost:1463
I think Its helping u. :)
Harshad Kathiriya
23-Jul-13 7:06am
View
Not any issue of that code..
Harshad Kathiriya
23-Jul-13 6:12am
View
ok let I wll see it and send the solution to your email id...
I also cant access my ID here... ;)
Harshad Kathiriya
23-Jul-13 6:08am
View
Deleted
no comment ;)
Harshad Kathiriya
23-Jul-13 5:58am
View
See my 3 hour past comment, I also done it in MVC..
If any other problem send your email id..
Harshad Kathiriya
23-Jul-13 5:38am
View
Its Correct.
And I think it will work fine. Not any issue..
Harshad Kathiriya
23-Jul-13 4:08am
View
paste that code. u write down..
Harshad Kathiriya
23-Jul-13 3:55am
View
ok gives the path like below
FileStream fs = new FileStream(Server.MapPath(@"~\Sales Report Folder\test.pdf"), FileMode.Open, FileAccess.Read);
Harshad Kathiriya
23-Jul-13 3:28am
View
FileStream fs = new FileStream(Server.MapPath(@"\D:\test.pdf"), FileMode.Open, FileAccess.Read);
Its wrong...
Write down like below..
FileStream fs = new FileStream(Server.MapPath(@"~\test.pdf"), FileMode.Open, FileAccess.Read);
And put your PDF file into your application folder then try again...
:)
Harshad Kathiriya
23-Jul-13 3:16am
View
I think some permission issue is there. Assign the full permission to that files.
Harshad Kathiriya
23-Jul-13 2:22am
View
Hey
try to do this
-- CSHtml page
<iframe src="@Url.Action("GetPDF")" width="90%" height="90%">
</iframe>
-- In Controller
public FileStreamResult GetPDF()
{
FileStream fs = new FileStream(Server.MapPath(@"~\HTP.pdf"), FileMode.Open, FileAccess.Read);
return File(fs, "application/pdf");
}
same link below ---
http://stackoverflow.com/questions/6439634/mvc-view-pdf-in-partial[^]
:)
Harshad Kathiriya
22-Jul-13 8:56am
View
I think its helpfull to you
https://www.simple-talk.com/dotnet/asp.net/asp.net-mvc-action-results-and-pdf-content/
Harshad Kathiriya
22-Jul-13 6:42am
View
like ItextSharp library
Harshad Kathiriya
22-Jul-13 6:33am
View
Can u use any library for displaying PDF file ?
If u want to show the image file than just to pass the virtual path and that path assigned to html image tag.. But in PDF u need to holder that to show that file.. like use Java applet to display that image or PDF...
Harshad Kathiriya
22-Jul-13 6:08am
View
Try to do this.
-- Controller
public ActionResult Index()
{
string fileName = Server.MapPath(@"~\Test.pdf");
ViewData["Message"] = fileName;
return View();
}
-- Cshtm file code
<div>
@{
var msg = ViewData["Message"];
}
@msg;
</div>
In the above code, your test file in stored into Application folder
Here, In my machine environment, My Application stored into D:\MVCTest folder and Test.PDF stored into this folder.
Its possible to help u..
:)
Harshad Kathiriya
22-Jul-13 5:43am
View
Actually, Server.MapPath gets the virtual path and return the physical path..
If you have the virtual path then u can access the physical file in your MVC application.. U can not pass D:\\Test.pdf path in server.MapPath... Because Server.MapPath gives path of your application...
Harshad Kathiriya
22-Jul-13 5:26am
View
May i know, What's actual scenario ?
So I'll get proper solution...
Harshad Kathiriya
20-Sep-12 3:24am
View
u want hyperlink on full record or particular columns ?
Harshad Kathiriya
18-Apr-12 3:10am
View
Hi
I can solved the problem.
Thanks
@Harshad
Harshad Kathiriya
18-Apr-12 0:20am
View
Any configuration in facebook app at the time to create ?
Harshad Kathiriya
18-Apr-12 0:18am
View
http://localhost:5000/TestFolder/Index.aspx
it's my redirect url.
Harshad Kathiriya
17-Apr-12 7:18am
View
Hi
I can use this link http://www.facebooksdk.blogspot.in and found the FB SDK.
I can change the setting as per above reference.
I got the below error after execute the application.
{
"error": {
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
"type": "OAuthException",
"code": 191
}
}
Thanks
@harshad
Show More