Click here to Skip to main content
16,004,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Having multiline textbox on my aspx page through that i am update case status of multiple case id. e.g case id like 1508,1509 are valid but with valid case id having invalid case id like 1508,1509,1111111. in that 11111111 is in valid case id so how so validation for that case id only & other are update successfully.
Posted

How do you know what are valid numbers? Use a CustomValidator[^] and implement that logic.
 
Share this answer
 
Comments
ravijain03 12-Apr-12 7:49am    
through my case details function
[no name] 12-Apr-12 8:25am    
OK. Like I said, implement that
Hi @ravijain

You can use the custom server side validation for this.
take the collection or the array of caseId's
perform following task on that

make the caseid splited(if you are not using ",")

process them and filter which are valid and which are invalid,
i am giving you sample codee for this

assume the case id's are like this(contains valisd and invalid)

C#
101,102,1022,102235,40555
i=0,i=1,i=2, i=3,   i=4
string validCaseID
for(int i;i<yourarrayitem.count;i++)>
{
if(functioncheckvalidcaseIdornot(yourarrayITEM[i]))
{
if(validCaseID="")
validCaseID=validCaseID+yourarrayITEM[i];
}
else
validCaseID=validCaseID+","+yourarrayITEM[i];
}
and you will get all the valid ID's as string("," seprated) then update there staus as you want status update successfully for the valid caseid's and not updated for the invalid case id's


Hope it will help you

Thanks
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900