Suppose I have one string ie. str="1000,1001,1002,1003,1004"
And I have compare with another variable following shows
if(str=="1003") { alert('Some Message'); }
how do that
try this :
const string str = "1000,1001,1002,1003,1004"; const string checkMe = "1004"; if (str.Contains(checkMe)) { ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('found');", true); }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.