Tuesday, July 26, 2005
ASP.NET.4GuysFromRolla.com: Adding Client-Side Message Boxes in your ASP.NET Web Pages, Part 2Displaying Alert Message Boxes
Besides having prompting the user to confirm that they want to perform an action, we might also want to notify the user of some server-side behavior. For example, if there was some server-side error and the data entered wasn't correctly saved, we might want to use an alert message box to inform the user. Or perhaps when attempting to add the data provided into the database, we deduced that the provided data was duplicate data. The question becomes, coming back from the server to the client, how would we alert the user with a message box?
Traditionally we would do this with JavaScript in the html of the page by creating an onload event that generated a message box. However like the previous case, ASP.NET provides us additional methods to handle all this from the code-behind without having to hard code HTML ourselves.
What we want to do is register a client script block with the ASP.NET Web page. More specifically, we want this to run when the page starts up on the client. Again it's our lucky day, as the ASP.NET Page class provides a RegisterStartupScript() method for that very purpose.
Besides having prompting the user to confirm that they want to perform an action, we might also want to notify the user of some server-side behavior. For example, if there was some server-side error and the data entered wasn't correctly saved, we might want to use an alert message box to inform the user. Or perhaps when attempting to add the data provided into the database, we deduced that the provided data was duplicate data. The question becomes, coming back from the server to the client, how would we alert the user with a message box?
Traditionally we would do this with JavaScript in the html of the page by creating an onload event that generated a message box. However like the previous case, ASP.NET provides us additional methods to handle all this from the code-behind without having to hard code HTML ourselves.
What we want to do is register a client script block with the ASP.NET Web page. More specifically, we want this to run when the page starts up on the client. Again it's our lucky day, as the ASP.NET Page class provides a RegisterStartupScript() method for that very purpose.
Monday, July 25, 2005
Friday, July 22, 2005
Tuesday, July 19, 2005
Monday, July 18, 2005
Junxion, Inc: making cellular data services more accessible boxes to allow multi user access to a cellular card