Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I finally wrote : CS file as</p> <pre><code>public string CreateLoginjson(string strErrorType, bool blIsAuthenticated) { StringBuilder sbLoginJson = new StringBuilder(); if (blIsAuthenticated) { sbLoginJson.Append("{LoginSuccess:1"); } else { sbLoginJson.Append("{LoginSuccess:0"); } if (strErrorType != string.Empty) { if (strErrorType.TrimEnd(new char[] { ',' }) == "Token" || strErrorType.TrimEnd(new char[] { ',' }).Split(new char[] { ',' }).Contains("BlankToken")) { sbLoginJson.Append(",txtTestTokenNumber1:\"Error\""); sbLoginJson.Append(",txtTestTokenNumber2:\"Error\""); sbLoginJson.Append(",txtTestTokenNumber3:\"Error\""); sbLoginJson.Append(",txtTestTokenNumber4:\"Error\""); } if (strErrorType.TrimEnd(new char[] { ',' }) == "Password" || strErrorType.TrimEnd(new char[] { ',' }).Split(new char[] { ',' }).Contains("BlankPassword")) { sbLoginJson.Append(",txtPassword:\"Error\""); } if (strErrorType.TrimEnd(new char[] { ',' }) == "UserName" || strErrorType.TrimEnd(new char[] { ',' }).Split(new char[] { ',' }).Contains("BlankUserName")) { sbLoginJson.Append(",txtUserName:\"Error\""); } string strLoadErrorControlMessage = LoadErrorControl(strErrorType, string.Empty); if (strLoadErrorControlMessage != string.Empty) { PageTestApplicationLogin objPageTestApplicationLogin = new PageTestApplicationLogin(objClientConfiguration); sbLoginJson.Append(",ErrorMessage:'" + objPageTestApplicationLogin.GetTestApplicationLoginErrorHtml("", strLoadErrorControlMessage).Replace("'", "\"") + "'"); } sbLoginJson.Append("}"); } var LoginJson = sbLoginJson.ToString(); return LoginJson; } </code></pre> <p>JS file :</p> <pre><code>if (objLoginJson.ErrorMessage != '' &amp;&amp; objLoginJson.ErrorMessage != undefined) { $('#ErrorControl').html(objLoginJson.ErrorMessage); $('#ErrorControl').find('#tblLoginError').css('display', 'block'); } else { $('#ErrorControl').html(""); $('#ErrorControl').find('#tblLoginError').css('display', 'none'); } </code></pre> <p>Thank you all for your Suggestions.. Cheers .... </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload