Click here to Skip to main content
15,884,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
pretty new to programming, i'm building a webpage using MVC.net nhibernate,in my controller i'm using FormCollection fm object and jquery datatable. my problem is that i have a text box search which should search for data inside my data table as attached in the photo, im able to search for any string but i cant search for amount or date,someone asked me to use Tryparse but i dont understand why do i need it and what should i parse exactly?it has an if and else i have no idea what to write in them i attached also some of the code that can search for string as below :
C#


C#
if (!string.IsNullOrEmpty(fm["SearchValue"]) && !string.IsNullOrEmpty(fm["SearchType"]))
                            {
                                criteria.Add(Restrictions.Like(fm["SearchType"], "%" + fm["MobileNo"] + "%"));
Posted

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