15,886,806 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 tornadofay (Top 7 by date)
tornadofay
18-Nov-15 20:38pm
View
I don't understand where your problem is, as I understand from your question is that you get error when you parse String to IPAddress if that what you mean then
I tried this at new windows application
<pre>
using System.Net;
private void button1_Click(object sender, EventArgs e)
{
string sc = IPA.Text;
var ip = IPAddress.Parse(sc);
MessageBox.Show(ip.ToString());
}
</pre>
while (IPA is TextBox)& tested under .NET 3.5 , .NET 4
I tested for input range 0.0.0.0 ~ 255.255.255.255 and it works fine with no problems at all.
for tests like (-1.256.0.0, 255.2552, ABC.fhf.0.1) ofcourse it will through Exception so you will need to do some validation there before parsing.
it will be more helpful to edit your post and add Exception (Message, Source and Stack trace) as it will give better understanding of your problem.
tornadofay
17-Nov-15 15:31pm
View
thanks for your reply,
I will try the Community Edition, although I use
MoonPdfPanel - A WPF-based PDF Viewer Control
[
^
] to display PDF combined with the above Method for printing and it's running pretty good.
tornadofay
10-Nov-15 11:10am
View
the user must type the UID, can it be automatic ?
like that the user enter 1232015 then leave the text that's where leave event fire we can at this event, get the last ID from DB for example then add +1 to it then add the last part to textbox text progamtically
tornadofay
7-Nov-15 14:53pm
View
this Solution may solve your problem, but Solution 4 is much far better, it's the right way to do validation than this way + it's easier to maintain in the long run.
I recommend solution 4 as better answer to your problem.
tornadofay
6-Nov-15 21:44pm
View
check the code i updated it to be compatible always with current year
tornadofay
6-Nov-15 14:52pm
View
no problem, for this type of validations you better write it first on paper in steps for what you really need. if you done it right on paper then it will be so easy to implement with code.
tornadofay
6-Nov-15 14:48pm
View
thanks,I don't know how i didn't see this.
any more suggestions ?
Show More