Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ASP.NET
Dear Friends,
 
I have created a window based application to get dates(From Date and To Date) which compares the Booking Date from the database and result will be displayed on Crystal report Viewer.
 
I created an exe file of it and tried to execute on Command Prompt. But i am not getting how to get those parameter in Form_Load event(crystalReportViewer1_Load).
 
Can anyone please help to solve this....
 
My command-line will be
 
c:> testRptExe '18/12/2012' '26/12/2012'
Posted 18 Dec '12 - 17:27
Edited 18 Dec '12 - 17:38


2 solutions

This makes no sense at all. If it's windows based, there is no code behind and it's not ASP.NET. If it's a windows app, the parameters are passed in to the entry point as an array. And, your question therefore is nonsensical
  Permalink  
Comments
Member 9501115 - 18 Dec '12 - 23:37
I am Sorry... I don't have much idea abt Window based app's. I thought the Form_Load() method will be the code-behind . So i used that word.. But i need solution for question!!!
Christian Graus - 18 Dec '12 - 23:41
Despite your question being a nonsense, I answered it. The entry point for your app is passed a collection of strings, that is the command line parameters. I don't have a windows based app open, but I think it's Program.cs that it lives in. Look for a Main method.
you can use this to read command line arguments from non-main method
foreach (string arg in Environment.GetCommandLineArgs())
{
    Console.WriteLine(arg);
}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 353
1 Sergey Alexandrovich Kryukov 138
2 Mohammed Hameed 123
3 Santhosh G_ 113
4 Ron Beyer 64
0 Sergey Alexandrovich Kryukov 8,266
1 OriginalGriff 6,516
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 19 Dec 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid