|
|
Hi,
I have the following string and i will pass the filename and then i want to get the corresponding path...
<br />
string url = @" --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3 Content-Type: text/plain; charset=utf-8; name=footer.txt Content-Disposition: attachment; filename=\""footer.txt\"" Content-Transfer-Encoding: base64 G:\test\Attach\test\footer.txt --------------Boundary-00=_BLD1cvEPKmuNkgPvUNY3-- ";<br />
<br />
Regex r = new Regex(@"[a-z]:\\([a-z1-9\.\s]+\\)+[a-z1-9\.\s]+\.\w",RegexOptions.IgnoreCase);<br />
<br />
string regString = r.Match(url).ToString();<br />
I am able to get the output as :
G:\test\Attach\test\footer.t
In the above url string there maybe a chance that there will be 2 or more attachment codes like the above in the same string. I want to get the path alone like G:\test\Attach\test\ by passing a filename along with extension.
I don't know how to do it? Can someone pls help me out.
Thanks,
Raja.
|
|
|
|
|
Hi,
System.IO.Path class offers methods to operate on paths.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi All,
I have developed an application using C# WinApp VS 2005 and MYSQL 5.0.1. My Query is it
possible by any means that I can create a setup application that can identify and install MySQL
Server on the deployment machine if its not installed on it. Also it will run the script file to create
database and user into MySQL Server. I have done some googleing but was unable to find
appropriate answer. Can it be done using InstallShield? If so, How to do it?
Its very urgent.
Please Help me.
Thanx in Advance,
Regards,
Paramhans Dubey
|
|
|
|
|
Hi all,
Is there any other links or forums that you know,
where the DOM related question are posted.
Because i don't get people related DOM here.
if some one has any idea please lead me
thanks
|
|
|
|
|
Hi,
do you need help with the DOM regarding XML. Then I would post the question in the XML/XSL forum. If you need help implementing this in C#, I would post here...
Regards
Sebastian
|
|
|
|
|
syntax error converting varchar valu' ' to a column of datatype int...
i got the above error can anybody tell solution to this...
|
|
|
|
|
if you post the code block that giving this error we'd be glad to help. I don't think anyone here have that prediction ability.
|
|
|
|
|
Hi,
Try to give the code snippet, so that you can get the help immediatly
and try to give proper subject name.
|
|
|
|
|
You are trying to put a varchar value in a integer column. It might be having string which cannot be converted to integer.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I have absolutely no idea what you're talking about, are you sure you should be posting this in the C# forum?
|
|
|
|
|
Hi,
don't use single or double quotes to insert a numeric value
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hi.
I want to create some reports from my data , the data aren't in Data Base , they generates along application's process !
I need to create something like this report[^]. I don't want to use WebBrowser, because it adds header and footer ( header => page number and page's title , footer => page's path and date ) to print's pages.
What do you suggest for it ?
I would be appreciate if you guide me.
|
|
|
|
|
Hi,
why don't you use Crystal Report ? and
What is the problem you have, in using Crystal Report?
|
|
|
|
|
As I know , Crystal Report works with Data Base and DataSet !
I couldn't find any samples of Crystal Report without using DataSet because of in my App there isn't a DataSet .
|
|
|
|
|
Hi Friend,
Anyway you have some data to display.
Then you can create a Data table or dataset and
set to the crystal report data source. This can be achieved easily.
|
|
|
|
|
Thanks.
jasome wrote: you can create a Data table or dataset and
set to the crystal report data source. This can be achieved easily.
Could you please post some links about it, I don't know how I can do it.
|
|
|
|
|
Hi,
It is just enough to google, you will get the answers any way see the bellow code
DataTable dtStudent = new DataTable();
dtStudent = ConstructDataTable();
Report.CrystalReport1 objStudent = new WindowsCrystal.Report.CrystalReport1();
objStudent.SetDataSource(dtStudent);
crystalReportViewer1.ReportSource = objStudent;
private DataTable ConstructDataTable()
{
DataTable dtTmp = new DataTable();
dtTmp.Columns.Add("Id", typeof(int));
dtTmp.Columns.Add("Name", typeof(string));
dtTmp.Columns.Add("Age", typeof(int));
dtTmp.Columns.Add("Score", typeof(int));
dtTmp.Rows.Add(1, "Jacob", 24, 50);
dtTmp.Rows.Add(2, "martin", 23, 90);
dtTmp.Rows.Add(3, "Jeyakumar", 24, 70);
dtTmp.Rows.Add(4, "Manic", 23, 59);
dtTmp.Rows.Add(5, "Rosario", 27, 48);
return dtTmp;
}
|
|
|
|
|
|
Mohammad Dayyan wrote: As I know , Crystal Report works with Data Base and DataSet !
I couldn't find any samples of Crystal Report without using DataSet because of in my App there isn't a DataSet .
If you're using CR2005 or beyond, you can create a report based on data as long as it's held in one of the collection classes.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I'm using VS2008, so I think I'm using CR2008 !
|
|
|
|
|
I prefer Stimulsoft Reports
Data is very easy to set from C# objects and pricing is good.
|
|
|
|
|
I use two treeviews in my form.
These treeviews have the same nodes.
The thing that i want to do is if i scroll the scrollbar of first treeveiw,i want the scrollbar of the second to be moved automatically like first treeview.
I want to see the same nodes on first and second treeview if i scroll the scrollbar of the first or second treeview.
If u have any idea to do this, pls point me.
Thanks a lot.
axiom.kid
|
|
|
|
|
|
Thank for ur help.
The link u point me shows the thing what i want to do.Thanks
|
|
|
|