Last active
February 16, 2021 05:32
-
-
Save ritacse/f4faa80f8cd6c7980c6867a02d781d93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HTML code | |
<div id="DataFromSession" runat="server"></div> | |
///set data from C# to HTML | |
var Id = Session["EmpId"]; | |
var UserType = Session["SUserType"]; | |
DataFromSession.InnerHtml = "<script type='text/javascript'>var IdJson=" + Id + ";var UserTypeJson=" + UserType + ";</script>"; | |
/// Access above data (UserTypeJson,IdJson) from js | |
if (parseInt(UserTypeJson) > 1 && IdJson != self.EmpId()) { | |
toastr.warning('You dont have enough privillege to save other employee information', 'Invalid'); | |
isValid = false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Access session data in HTML page | |
<input id="sessionInput" type="hidden" value='<%= Session["EmpAutoID"] %>' /> | |
<table style="width: 100%"> | |
<tr> | |
<td class="Company"><%=ApprovalSystem.Classes.Common.ReportCommonData.ReportCompany %></td> | |
</tr> | |
<tr> | |
<td style="width: 129px"><b>Company</b></td> | |
<td style="width: 12px"><b>:</b></td> | |
<td style="width: 350px;"><%if (mainTable.Rows.Count > 0) | |
{ | |
Response.Write(mainTable.Rows[0]["Company"].ToString()); | |
} %></td> | |
<td style="width: 179px"><b>General Duty Date</b></td> | |
<td style="width: 5px"><b>:</b></td> | |
<td style="width: 350px;"><% if (mainTable != null && mainTable.Rows.Count > 0) | |
{ | |
Response.Write(mainTable.Rows[0]["GeneralDutyDate"].ToString()); | |
} %></td> | |
</tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment