15,902,846 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 amaljosep (Top 32 by date)
amaljosep
8-Mar-13 1:02am
View
how to make the column as writable?
amaljosep
24-May-12 8:54am
View
i am using the corresponding code from the page you specified,
public void OpenNetworkConnection(string savePath, string username, string password)
{
var directory = Path.GetDirectoryName(savePath).Trim();
var process = new Process { StartInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = "NET USE " + directory + " /user:" + username + " " + password
}
};
process.Start();
process.Close(); }
public void CloseNetworkConnection(string savePath)
{
var directory = Path.GetDirectoryName(savePath).Trim();
var process = new Process
{
StartInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = "NET USE " + directory + " /delete"
}
};
process.Start();
process.Close(); }
}
amaljosep
24-May-12 8:29am
View
still its giving me error saying "network path cannot be found"..wat can be the reasons??
amaljosep
24-May-12 6:35am
View
yes..i also think so..
amaljosep
24-May-12 6:34am
View
thanks a lot for helping me....but still its giving me the same error.
amaljosep
24-May-12 3:25am
View
The code i wrote is,
public void ftpfile(string ftpfilepath, string inputfilepath)
{
string ftphost = "149.223.26.33";
string ftpfullpath = "ftp://" + ftphost + ftpfilepath;
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpfullpath);
ftp.Credentials = new NetworkCredential("amaljose", "amal*03");
ftp.Timeout = 10000000;
ftp.KeepAlive = true;
ftp.UseBinary = true;
ftp.Method = WebRequestMethods.Ftp.UploadFile;
FileStream fs = File.OpenRead(inputfilepath);
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();
ftp.Proxy = null;
Stream ftpstream = ftp.GetRequestStream();
FtpWebResponse response = (FtpWebResponse)ftp.GetResponse();
ftpstream.Write(buffer, 0, buffer.Length);
ftpstream.Close();
Console.WriteLine("Upload File Complete, status{0}", response.StatusDescription);
response.Close();
}
and in the main function
public static void Main(string[] args)
{
Class1 b1 = new Class1();
b1.ftpfile(@"//D:/Developers/muralim/TRW.HRM.Headcount_LMSFeed/Log" + @"/" + "employeedetails1.txt", @"C:/Documents and Settings/aj99823/Desktop/project/employeedetails1.txt");
}
amaljosep
24-May-12 3:22am
View
thanks a lot for helping me....but here how to specify the ftp path.my ftphost is 149.223.26.33 and my ftp file path is D:\Developers\muralim\TRW.HRM.Headcount_LMSFeed\Log.to this path i need to copy the content from my local system which is placed in C:\Documents and Settings\aj99823\Desktop\project\employeedetails1.txt.i changed the code accordingly .but its still throwing me one error saying "The underlying connection was closed: An unexpected error occurred on a receive.".can u plss help me..?
amaljosep
2-Apr-12 10:01am
View
it worked...once again thanks a lot for helping me.......
amaljosep
30-Mar-12 8:19am
View
thanks a lot for your help.......
amaljosep
30-Mar-12 8:17am
View
thanks a lot for your help........
amaljosep
29-Mar-12 3:29am
View
it works for me.....thanks a lot for ur help...
amaljosep
29-Mar-12 1:52am
View
i am having one query like whether we can allign the values in the column to the center in the newly created rows.
for eg whether we can allign name and date to the center of the column in the above example???
amaljosep
29-Mar-12 1:22am
View
its works for me....thanks a lot for your help........
amaljosep
29-Mar-12 1:00am
View
thanks a lot for ur helps.it works for me.......i am having one query like whether we can allign the values in the column to the center in the newly created rows.
for eg whether we can allign name and date to the center of the column in the above example???
amaljosep
28-Mar-12 2:30am
View
i need to use datagrid instead of gridview.i also got one alternate solution using gridview.anyway thanks a lot for your help........if u know how to implement this using datagrid ,plsss help me...
amaljosep
28-Mar-12 2:17am
View
GVIntReport refers to what?
amaljosep
15-Mar-12 3:28am
View
see i need to confirm my email address for doing the rating......will surely do it in the evening...
amaljosep
15-Mar-12 3:01am
View
yes...its working....thanks a looooooot for helping me.....
amaljosep
15-Mar-12 2:47am
View
no ...its throwing the same error again....
amaljosep
15-Mar-12 2:36am
View
ada machineini..................ninakke njan utharam paranju tharameda patti....
amaljosep
27-Feb-12 5:12am
View
if i give like this in app.config...how should i call it in the button click event?
amaljosep
17-Feb-12 8:11am
View
i am using a content page....so it does'nt contain head tags and all....so where i can place the script tag in the content page ....
amaljosep
17-Feb-12 4:47am
View
i am using a content page of my master page....wheather it makes any difference?if no then where to put the script tag in content page.
amaljosep
17-Feb-12 4:46am
View
i am using a content page of my master page....wheather it makes any difference?if no then where to put the script tag in content page.
amaljosep
17-Feb-12 0:40am
View
this is an asp.net page..i am using the plain old asp.net
amaljosep
15-Feb-12 0:36am
View
Deleted
i didnt get u..
amaljosep
15-Feb-12 0:35am
View
still the same error......
amaljosep
14-Feb-12 23:54pm
View
sry 4 my bad issue report....anyway i got the solution.i didnt initialized my class obects ...thats y it was showing that erre.....thanks a lot for the quick reply...
amaljosep
9-Feb-12 2:20am
View
yes...i got it......thanks a loooooot for the quick reply.......
amaljosep
9-Feb-12 1:40am
View
Deleted
i put the code like this
private void Fillstate(int countryid)
{
string strConn = "Data Source=CSZ-PCS43132\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True";
SqlConnection con = new SqlConnection(strConn);
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT stateid,statename FROM tblstate WHERE stateid="+countryid ;
DataSet objDs = new DataSet();
SqlDataAdapter dAdapter = new SqlDataAdapter();
dAdapter.SelectCommand = cmd;
con.Open();
dAdapter.Fill(objDs);
con.Close();
if (objDs.Tables[0].Rows.Count > 0)
{
DropDownList2.DataSource = objDs.Tables[0];
DropDownList2.DataTextField = "statename";
DropDownList2.DataValueField = "stateid";
DropDownList2.DataBind();
DropDownList2.Items.Insert(0, "--Select--");
}
else
{
lblmsg .Text = "No states found";
}
}
protected void DropDowncountry_SelectedIndexChanged(object sender, EventArgs e)
{
int countryid = Convert.ToInt32(DropDownList1 .SelectedIndex.ToString ());
Fillstate (countryid);
DropDownList3.SelectedIndex = 0;
}
protected void DropDownstate_SelectedIndexChanged(object sender, EventArgs e)
{
int stateid = Convert.ToInt32(DropDownstete.SelectedValue.ToString());
FillSite(stateid );
}
amaljosep
9-Feb-12 1:34am
View
Deleted
still error cmng for me...we need to put all the dropdownlist's autopostback property to true..r8?but its not working...1st dropdown is populating....and labelbox is displaying showing no corresponding state can be found ....can anyone plzz help me.....
amaljosep
9-Feb-12 0:49am
View
Deleted
i am getting an error saying input string not in correct format....
in the selected_index event of the country dropdownlist...plzz help me..
Show More