Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
Hi Guys, i have the next question.
if i have a method in a Web Service and this method need 1 parameter, but the person who is callin my web service not pass the parameter correctly. how can i validate that parameter before the function take it this if is missing or the datatype is in incorrect formtat? there´s a way to prevent this?
here put an example
Dim sResult As DataSet
result = WebService.GetInformation("") ''Here should go the parameter, but assuming that the client is not assigned it
The Next code below is the web service.
Public Function GetInformation(ByVal CodSeguridad As Integer) As DataSet ''here trow me an Error of dataTpye or if the parameter is missing
thanks in advance.
Posted 28-Jul-11 6:20am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is no in built support for this, but wthese two articles might give you a direction:[^][^]
Rene Bustos at 29-Jul-11 9:39am
Manas. thanks for the answer. I hope stay in this site for a long time.
thanks i gona give you accepted solution, the links posted are very good.
see you later.From Mexico.
Manas Bhardwaj at 29-Jul-11 9:43am
glad, it helped you!

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

  Print Answers RSS
0 OriginalGriff 476
1 Sergey Alexandrovich Kryukov 215
2 CHill60 195
3 Afzaal Ahmad Zeeshan 145
4 TheRealSteveJudge 120
0 Sergey Alexandrovich Kryukov 9,061
1 OriginalGriff 7,920
2 Peter Leow 4,774
3 Kornfeld Eliyahu Peter 3,210
4 Maciej Los 2,176

Advertise | Privacy | Mobile
Web02 | 2.8.150327.1 | Last Updated 28 Jul 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100