Click here to Skip to main content
15,881,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
i need to compare two string

one string comes from datarow and other from request.querystring


I have used Server.UrlEncode for dest in querystring from where i call function to compare
i.e caling/dest=Server.UrlEncode("Test/di||SS");
C#
DataTable dbTblName = new DataTable();


DataRow drT=new dbTblName();

drT["desp"]="Test/di||SS";

dbTblName.add(drT);

bool chkval = ComparestrDB(drT["desp"]);
 
chkval// this is  false  


function bool ComparestrDB(DataRow DrRow["desp"]){
bool called=false;
        string fone =DrrRow["descp"].ToString();

       string snd = Request.QueryString["dest"].ToString();

if(fone==snd)
{
   called=true;
}

return called;
}





Pls check and revert.....
Posted
Comments
ArunRajendra 17-Jul-14 1:38am    
DrrRow["descp"] DrRow["desp"] is this two same.
maulikshah1990 17-Jul-14 1:40am    
yes.. but i got solution , thank you.. i used @ before DrrRow["descp"].ToString()

and it works..

1 solution

yes.. but i got solution , thank you.. i used @ before DrrRow["descp"].ToString()

and it works..
 
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