dimanche 11 septembre 2016

how to check null in javaScript function?

I want to check null and empty id in JavaScript function,but if syntax isn't work ?

var id = "<%=Request["Id"]%>";
 if (id !== "")
 if (id !== null)
{var id = "<%=new Guid(Request["ID"].ToString())%>";
 window.location = "/Controller/Action.aspx?Id=" + id; }

Aucun commentaire:

Enregistrer un commentaire