15,899,314 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 Python 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 masoud_sedighy (Top 16 by date)
masoud_sedighy
25-Feb-13 14:52pm
View
i added source of page to question
masoud_sedighy
27-Nov-12 10:28am
View
i have some folders with this structure in web server Document/Detail Engineering/Building and then paste some pdf files in that. now the tree view shows folders & files but i like when click on each pdf file in the tree view dialogue box of download comes up and i can open or save pdf file.
masoud_sedighy
27-Nov-12 8:54am
View
i did it, but does not works.
masoud_sedighy
23-Nov-12 8:44am
View
what i understand is the nodes in the same level must be have the same parentid and if level depth is more parent id also must be more for excample if level depth is 1 parent id of same levels should be 1000 and if level depth is 2 parent id of same levels should be 2000, if level depth increase parent id also must increase for example parent id of level depth 2 can not be 1000 and parent level depth 1 2000.
masoud_sedighy
25-Mar-12 4:56am
View
Actually my question comes about how to use "Server.MapPath" function when files and my web application are not in the same directory.
For example I like to use something like the below code when directories are not the same.
The samples I have seen in the net like below are in the same directory.
protected void lnkPath_OnClick(object sender, EventArgs e)
{
GridViewRow datarow = (GridViewRow)(((Control)sender).NamingContainer);
int i = datarow.RowIndex;
foreach (GridViewRow rowItem in grdv.Rows)
{
if (rowItem.RowIndex == i)
{
string filename = rowItem.Cells[0].ToString();
if (filename != "")
{
string path = Server.MapPath(filename);
System.IO.FileInfo file = new System.IO.FileInfo(path);
if (file.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(file.FullName);
Response.End();
}
else
{
Response.Write("This file does not exist.");
}
}
}
}
}
masoud_sedighy
13-Mar-12 0:19am
View
Thanks
After reading article "A Beginner's Guide to ASP.NET Application Folders" I understood, I have to move my Utilities folder with it's "FileUtilities.cs" to "Appcode" folder and now sample "Upload and Download Files" is working.
Actually before I try to read these basics but until actions some of them is not clear for me.
For example now "namespace" in action is not very clear for me and I am looking for A Beginner's Guide for that.
masoud_sedighy
13-Mar-12 0:17am
View
Thanks
After reading article "A Beginner's Guide to ASP.NET Application Folders" I understood, I have to move my Utilities folder with it's "FileUtilities.cs" to "Appcode" folder and now sample "Upload and Download Files" is working.
Actually before I try to read these basics but until actions some of them is not clear for me.
For example now "namespace" in action is not very clear for me and I am looking for A Beginner's Guide for that.
masoud_sedighy
14-Feb-12 5:40am
View
thanks
I used jquery and it works very good when i open by opera . just one of my problem is, group item will not be showed in fire fox and internet explorer.
please help how i can solve.
masoud_sedighy
7-Feb-12 11:33am
View
thanks
sorry actually i do not know this type of error. what i have done is :in webform1 i have used to text boxes and 1 button and then i used this click event in that for opening webfrom2.
protected void Button1_Click(object sender, EventArgs e)
{
string make = TextBox1.Text;
string model = TextBox2.Text;
Response.Redirect(string.Format("~/webform2.aspx?param1={0}¶m2={1}", make, model));
}
masoud_sedighy
20-Nov-11 1:43am
View
Thank you very much SAKryukov,excuse me if I am late for answering I run the code like below and it works very well.
E:\sample\ConsoleApplication1\ConsoleApplication1\bin\Debug> consoleApplication1.exe http://www.document.com dw-001
I have another question; actually I do not know exact file names in the web site. I have the list of my documents No like below:
Dw-001
Dw-002
Dw-003
But uploaded files in the server have something more (suffixes) for example like below
Dw-001_rev01.pdf
Dw-002_Rev2_sheet1.pdf
Actually main parts are similar and I know what they are but I do not know suffixes.
Now I like to know can I download my file if I use something like wild card * or % like below
consoleApplication1.exe http://www.document.com dw-001*
Or
consoleApplication1.exe http://www.document.com dw-001%
Or something else. can do that.
masoud_sedighy
12-Nov-11 8:33am
View
i just drag grid view1 to my default.aspx and make load page event like below, i do not know what changes i have to do in grid view.
thanks.
<asp:GridView ID="GridView1" runat="server">
masoud_sedighy
12-Nov-11 3:39am
View
sorry i did not about instruction so me just copied and pasted from microsoft word. in future i will take care about that.
also i like to know where i can find the instruction about format.
thanks in advanced.
masoud_sedighy
5-Nov-11 8:13am
View
thanks i will try that.
masoud_sedighy
5-Nov-11 4:32am
View
thanks, i am new to link , i like to have a bit easier article like "“LINQ Demo with ASP.NET Web Application” that describes for the "Detail View".
Best regards.
masoud_sedighy
14-Oct-11 12:27pm
View
Hello
Thanks, your solution works. Also I had mistake in "customer" class. Because when I renamed that to "Customer" that worked for me. It seems caps lock "c" is important .
Thanks a lot
masoud_sedighy
4-Mar-11 11:22am
View
Thanks
I am new to asp.net…so I do not how I have to use the code and where I have to paste that? How I have to execute that?
Just I know that I have some Doc NO (file names):
DW-001
DW-002
DW-003
And I like to download these files by batch from internet site that I am his user.
Best regards.
Show More