C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

vb to c#


Posted Date: 28 Jun 2008      Posted By: Santhanakrishnan      Member Level: Silver     Points: 1   Responses: 2



Hi,

Dim strLongFilePath As String = fileupload1.PostedFile.FileName
Dim intFileNameLength As Integer = InStr(1, StrReverse(strLongFilePath), "\")
Dim strFileName As String = Mid(strLongFilePath, (Len(strLongFilePath) - intFileNameLength) + 2)

please give me the above code convert in C#.

Thanks in advance,
santhanam.





Responses

Author: SathyaSiva    28 Jun 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 4

string strLongFilePath = fileupload1.PostedFile.FileName;
int intFileNameLength = Strings.InStr(1, Strings.StrReverse(strLongFilePath), "\\");
string strFileName = Strings.Mid(strLongFilePath, (Strings.Len(strLongFilePath) - intFileNameLength) + 2);



Author: Santhanakrishnan    28 Jun 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 0

thanks a lot sathya


Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Aligning dynamic controls
Previous : Date format change
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use