Wednesday, June 22, 2011
Name start with D came first, although i used ascending order
There was a space character in the name feild in the database. That was the reason for D came first :)
Thursday, May 12, 2011
Configuration Error - Unrecognized attribute 'type'.
I got this error message when i host a web application in server. Go to properties of the web site and change the asp.net version.
Monday, May 9, 2011
Timeout message before session expire
Here a javascript solution for detecting session expire.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style type="text/css">
.message
{
border: 1px solid #CCCCCC;
position: absolute;
width: 400px;
border: 1px solid #c93;
background: #ffc;
padding: 5px;
left: 0px;
top: -170px;
}
</style>
<script language="javascript" type="text/javascript">
function ShowAlert() {
//get the height and width of the screen
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
//get the height and width of the message box
var popupHeight = $("#TimeoutMessage").height();
var popupWidth = $("#TimeoutMessage").width();
//show the message box
$("#TimeoutMessage").animate({
"top": windowHeight / 2 - popupHeight / 2,
"left": windowWidth / 2 - popupWidth / 2
}, 1000);
//close the message box when cross red image is clicked
$("#close_message").click(function() {
$("#TimeoutMessage").fadeOut("slow");
});
setTimeout('Redirect()', 300000); //15 minutes in milliseconds
}
function Redirect() {
window.location = "../../logout.aspx";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="TimeoutMessage" class="message">
<p>
You will be logged out due to inactivity in 5 minutes.<br /><br />
Please refresh this page, or click on an action to refresh your session.</p>
</div>
</form>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
setTimeout('ShowAlert()', <%=((Session.Timeout * 60) * 1000) - 300000 %>);
});
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style type="text/css">
.message
{
border: 1px solid #CCCCCC;
position: absolute;
width: 400px;
border: 1px solid #c93;
background: #ffc;
padding: 5px;
left: 0px;
top: -170px;
}
</style>
<script language="javascript" type="text/javascript">
function ShowAlert() {
//get the height and width of the screen
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
//get the height and width of the message box
var popupHeight = $("#TimeoutMessage").height();
var popupWidth = $("#TimeoutMessage").width();
//show the message box
$("#TimeoutMessage").animate({
"top": windowHeight / 2 - popupHeight / 2,
"left": windowWidth / 2 - popupWidth / 2
}, 1000);
//close the message box when cross red image is clicked
$("#close_message").click(function() {
$("#TimeoutMessage").fadeOut("slow");
});
setTimeout('Redirect()', 300000); //15 minutes in milliseconds
}
function Redirect() {
window.location = "../../logout.aspx";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="TimeoutMessage" class="message">
<p>
You will be logged out due to inactivity in 5 minutes.<br /><br />
Please refresh this page, or click on an action to refresh your session.</p>
</div>
</form>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
setTimeout('ShowAlert()', <%=((Session.Timeout * 60) * 1000) - 300000 %>);
});
</script>
</body>
</html>
Thursday, April 28, 2011
Microsoft Community Contributor Award - 2011
I’m very pleased and honored to share this with all of you that my community contributions have been recognized by Microsoft. I have received the Microsoft Community Contributor Award for year 2011. This was a big and very special surprise to me…
This is great motivation to continue contributing and become even bigger influencer in online and offline community, locally and worldwide!
Microsoft, Thank you.
This is great motivation to continue contributing and become even bigger influencer in online and offline community, locally and worldwide!
Microsoft, Thank you.
Wednesday, April 27, 2011
Tool Tip for GridView Header
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
foreach (TableCell cell in e.Row.Cells)
{
cell.Attributes.Add("title",cell.Text);
}
}
}
Tuesday, April 5, 2011
Subscribe to:
Posts (Atom)
I Built a New Kind of Number Puzzle Game (And You Can Play It Free)
For a long time, I wanted to play a mobile puzzle game that felt genuinely strategic—something that required real brainpower, skipped the a...
-
Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...
-
When you already have IIS running then you may not be able to run WAMP Server at Localhost. You need to shutdown IIS in order to run WAMP Se...
-
Here a javascript solution for detecting session expire. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat=...
