<html> <head> <style type="text/css" media="print"> textarea {border:0;} </style> <script> function countLines(obj){ //count number of lines entered return obj.value.match(new RegExp("(\\n)","g")).length; } function doPrint(){ txta = document.getElementById("ta"); //expand textarea according to entered text txta.rows=countLines(txta); window.print(); } </script> </head> <body> <input type="button" text="Print" onclick="doPrint()"> <form> <textarea id="ta" cols="80" rows="2">Some text with line breaks some more texts</textarea> </form> </body> </html>
Friday, May 26, 2006
Printable Forms with Javascript
Friday, May 19, 2006
How to Deploy ASP.NET 2.0 Web Site Administration Tool (WAT) on Production Servers
Create a virtual directory ASP.NETWebAdminFiles in IIS that point to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles
Open properties windows of the new virtual directory, make sure that it is configured to run with ASP.NET 2.0, and in Security tab, uncheck Anonymous Access, check Integrated Windows Authentication.
After that, you will be able to connect to WebAdminTools using the following syntax
http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=XXX&applicationUrl=/YYY
in my case, it is:
http://localhost/ASP.NETWebAdminFiles/default.aspx?applicationPhysicalPath=D:\Tasks\Libranyon\Photonyon\&applicationUrl=/Photonyon
Although I don't recommend to do it, if you want to access WebAdminTool from other computer, open WebAdminPage.cs from (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\App_Code) and comment the following code block
if (!application.Context.Request.IsLocal) { SecurityException securityException = new SecurityException( (string)HttpContext.GetGlobalResourceObject('GlobalResources', 'WebAdmin_ConfigurationIsLocalOnly')); WebAdminPage.SetCurrentException(application.Context, securityException); application.Server.Transfer('~/error.aspx'); }
Wednesday, May 17, 2006
Introduction to Ajax with ASP.NET 2.0
Some simple examples of ASP.NET 2.0 client-script callbacks, includes ATLAS.
15 Seconds : The ASP.NET Page Life Cycle
Extremely helpful for developers who have worked with PHP and ASP(pre-.Net) and now want to get productive by mixing new techniques with old tricks.
Subscribe to:
Posts (Atom)