asadullahabkari
Thursday, May 8, 2014
How to do auto logout and redirect to login page when session expires using asp.net?
http://www.dotnetgallery.com/kb/resource9-how-to-do-auto-logout-and-redirect-to-login-page-when-session-expires-using.aspx
Wednesday, May 7, 2014
Numeric and Decimal validations
Float
Int
$(".allownumericwithdecimal").on("keypress keyup blur",function (event) {
//this.value = this.value.replace(/[^0-9\.]/g,'');
$(this).val($(this).val().replace(/[^0-9\.]/g,''));
if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
event.preventDefault();
}
});
$(".allownumericwithoutdecimal").on("keypress keyup blur",function (event) {
$(this).val($(this).val().replace(/[^\d].+/, ""));
if ((event.which < 48 || event.which > 57)) {
event.preventDefault();
}
});
Numeric values only allowed (With Decimal Point)
Int
Numeric values only allowed (Without Decimal Point)
$(".allownumericwithdecimal").on("keypress keyup blur",function (event) {
//this.value = this.value.replace(/[^0-9\.]/g,'');
$(this).val($(this).val().replace(/[^0-9\.]/g,''));
if ((event.which != 46 || $(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) {
event.preventDefault();
}
});
$(".allownumericwithoutdecimal").on("keypress keyup blur",function (event) {
$(this).val($(this).val().replace(/[^\d].+/, ""));
if ((event.which < 48 || event.which > 57)) {
event.preventDefault();
}
});
Sunday, February 10, 2013
Is it possible to secure swf files?
1- Obfuscate your ActionScript using an advanced obfuscator such as secureSWF.
2- Domain lock your SWF files.
3- Create a dummy loader, rename the original SWF files and change their extension, then load the original SWF files using the dummy loader.
4- Make sure to prevent hot linking. (this will depend on your web server)
5- Encrypt sensitive strings in your ActionScript; either manually in your code, or you can also use secureSWF for that.
Friday, February 8, 2013
Crystal Report Dynamically Binding
protected void cmdPreview_Click(object sender, EventArgs e)
{
try {
if (txtfrmDate.Text == "") { WebMsgBox.Show("From date must requir...."); return; }
if (txtToDate.Text == "") { WebMsgBox.Show("to date must requir ...."); return; }
UserInfo.cRptTag = "RoasterdetailRpt";
UserInfo.crptDepartmentID = DDLDept.SelectedValue;
UserInfo.crptDateFrom = txtfrmDate.Text.Trim().Substring(6, 4) + '-' + txtfrmDate.Text.Trim().Substring(3, 2) + '-' + txtfrmDate.Text.Trim().Substring(0, 2);
UserInfo.crptDateTo = txtToDate.Text.Trim().Substring(6,4)+'-'+txtToDate.Text.Trim().Substring(3,2)+'-'+txtToDate.Text.Trim().Substring(0,2) ;
//Response.Redirect("/frmViewer.aspx");
RptViewer.RefreshReport();
ReportDocument rd = new ReportDocument();
string strRptPath = System.Web.HttpContext.Current.Server.MapPath("~/Reports/CrossTabbedAttendanceFinal4.rpt");
//qry = " Select Code,Name,Description,LeaveMode,UnitType,Quantity " +
// " from tblLeaveType " +
// " Where (companyID=" + UserInfo.cCompanyCode + ")";
string qry = "exec Generate_RosterDepartmentWise '" + UserInfo.crptDepartmentID + "' ,'" + UserInfo.crptDateFrom + "' ,'" + UserInfo.crptDateTo + "'";
tbl = db.GetTableToSql(qry, "x");
rd.Load(strRptPath);
rd.SetDataSource(tbl);
RptViewer.ReportSource = rd;
Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();
RptViewer.RefreshReport();
}
catch (Exception x) { WebMsgBox.Show(x.Message); }
}
Friday, January 25, 2013
Reducing Your Website's Bandwidth Usage
Reducing Your Website's Bandwidth Usage
http://www.codinghorror.com/blog/2007/03/reducing-your-websites-bandwidth-usage.html
Sunday, January 6, 2013
Guide / How To / Tutorial and Article list
http://forum.videohelp.com/threads/169292-How-to-stream-live-TV-using-Windows-Media-Encoder
Saturday, January 5, 2013
[AS3] Hiding Assets And Code By Embedding SWF Within Another SWF
http://www.ghostwire.com/blog/archives/as3-applying-rot128-encryption-on-bytearray/
Subscribe to:
Posts (Atom)