Tuesday, December 11, 2007

To display the content in the web browser status bar

<’''body id="samplepage" onload ="window.status='First Page'">
<''form id="Form1" method="post" runat="server">

<''/form>
<’''/body>
Disabling the right click in the webpage
" <" body id="”samplepage”" oncontextmenu="return false;">

<"/body>"
Getting the client browser / system details through ASP.NET

HttpBrowserCapabilities bc=new HttpBrowserCapabilities();
bc=Request.Browser;
Response.Write(bc.Cookies.ToString());
Response.Write(bc.ActiveXControls.ToString());
Response.Write(bc.Platform.ToString());

Here HttpBrowserCapabilities is an class which is available in the system.web namespace ,first create an object and assign the client browser to it then we can get the details of the client browser with this the different property available

Response.Write( HttpContext.Current.Server.MachineName ) ;


This is used to get the client system name

Wednesday, December 05, 2007

Using shared variables in Crystal report

1. Create a formula in mainreport as @iammainformula with shared variable declared as Shared stringVar amtword := {?amntInWords};


2. Create a formula in subreport as @iamsubformaula with the shared variable with same name as we declared in the main report
Shared stringVar amtword ;
amtword;

now we can access the value from the main report in the sub report