Tuesday, December 11, 2007

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

Sunday, October 14, 2007

How do i learn from my Job ?


Many of well-wishers and friends had advised me to learn from the present job and try to go for a better job. At the beginning I am very confused about “Learning the Job “, because I thought learning the technology is enough to grow up in the carrier but that’s not a true apart from learning that, there are lot of other things are there to learned. When I grew up in my carrier I started understanding the real meaning for “Learning the Job”. So I thought of sharing my view with you all. Basically, learning means what we grasped from the work which we do or what we grasped from the environment which we are. Just a very small list that I used to follow

1. Learn professionalism both in the work the and culture
2. Learn the best use of Technologies
3. Learn to Update yourself with latest technology and news
4. Learn how to Speak
5. Learn how to write and maintain documents
6. Learn how to handle the situations
7. Learn the real Business
8. Learn how to present yourself
9. Learn how to motivate other and to get self-motivated
10. Learn how to deal with peoples
11. Learn the way to analyze the situations
12. Learn how to build a team
13. Learn your Duties
14. Learn to take responsibility
15. Learn to plan and Execute
16. Learn to Manage Time
17. Learn to make good relation with your co-workers
18. Learn how to earn
19. Learn how to set a target and focus on that
20. Learn all the bad things in your profession which will help you to do the good things
21. Learn to be loyal
22. and finally learn to LOVE your work


These are all a very small list which I had given. There are lot to learn .Learning the work and the work culture will vary from the company to company and the locality to locality and that to depend on the team which you work .don’t scold me if there is any grammatical mistake .sorry .hahaha
Generating KeyPair using SN.EXE

The Strong Name tool helps to sign assemblies with strong names. SN Stands for Strong Name
The Strong Name Consists of the Assembly Identification like Assembly Name ,Version ,Culture ,Public Key, and digital signature

The Public Key can be generated by using the .Net Framework tool (SN.EXE).

The key pair generated can be used for different assembly
The Strong name solves the versioning problem and naming problem
The user can deploy an assembly with the same name and same key pair in the GAC just by changing the version number

The simple syntax to generate strong name
Go to visual studio 2003 Command prompt and type the following command to generate the Key pay

Sn – K C:\Strongname.snk
When you type enter the strong name file will be generated in the specified location
To export the key from 1 file format to another
Sn – o C:\Strongname.snk C:\Strongname.txt
Sn – p C:\Strongname.snk C:\Strongname.txt

To Verify
Sn – v Sample.dll
It will verify for the strong name signature in the assembly if you put –vf instead of –v it’s a force verification

Wednesday, August 08, 2007

Hi,
If you want to disable the right click option in the browser, include the following lines of code in the header portion of the page.
<SCRIPT>
function noRightClick()
{

if (event.button == 2)
{
alert("Right Click Not Allowed!");
return false;
}

}
document.onmousedown = noRightClick
</SCRIPT>

Regards,
Sasikumar
Protecting your SAM Database


How to I protect my system. How to make my PC more secure on windows environment there are few common way we can protect our PC

By setting the BIOS password.
By Setting Windows password
By using system Hardware key


By using SYSKEY Utility.

I know most of will know the first 3 way of protecting and the fourth is quite different. Even thought SYSKEY Utility. is part of our OS we are not used to it . Let me explain about it .first we will know where this SYSKEY Utility resides inside our OS it’s in C:\WINDOWS\system32 folder. This utility is used to protect the System Account Manager Database (SAM) to run this utility go to run and type syskey




Fig1
The SYSKEY Utility will open now



Fig 2

Ok what is SAM what it does, this is the place where the OS will maintain the system username and password in encrypted format, now what the SYSKEY utility will do . it will move the decryption key to the floppy disk so that if you put the Floppy disk, only the system will open . Lets explain what’s there in the fig 2 here we have the Encryption Disabled and Encryption Enabled.

When you select the Encryption Disabled it will not encrypt the syskey if you select Encryption Enabled it will encrypt. After that clink the update button




Fig 3
In this screen we have the two options first the password setup which the user can give for their own or else we can select the system generated password. Again here we have the two way of storing the password. When you select the store startup key on floppy disk. The encrypted key will be stored in the floppy or if you select the store startup key locally it will be stored in the local system itself. This one of the most secure way to protect your system the data.







Wednesday, July 18, 2007

Trciks to play Minesweeper Game.

Press X, Y, Z, Z, Y, Shift +Enter, Enter


Now open the Minesweeper and watch the Top Left Corner of the screen and move your mouse cursor over the mine in the game. If there is no boom the Top Left Corner pixel will be set to 1 or else it will be set to 0 so you can see the difference in the Top Left Corner pixel. Based on this you can easily finish the game

Monday, July 16, 2007

Enabling Arabic in SQL server /Arabic is not recognized in SQL server it displays as “???????”.i had seen may query like this in many discussion group and I had also faced the same problem .These are the few tips which I had followed to solve the problem

Solution 1:
Set the collation for the field to Arabic while creating the table

How do I change the collation for the existing table?

ALTER TABLE #studrelation ALTER COLUMN stu_rela_code
Nvarchar(100) COLLATE Arabic_CI_AS NOT NULL



Here Arabic_CI_AS

Arabic – Language which you need
CI/CS - Case Insensitive / Case Sensitive
AS/KS/WS - Accent sensitivity/ Kana Sensitivity/ Width sensitivity


Solution 2:

Arabic will be recognized only with data type Nvarchar, text if you insert in varchar data type it won’t work.

CREATE TABLE #studrelation
( stud_id int,
stu_rela_code Nvarchar(100)
)
Insert into #studrelation(stud_id,stu_rela_code)values(1,'رسوم كتب')

select * from studrelation where stu_rela_code like N'%رسوم كتب%'

Friday, July 13, 2007

In this we will learn about the WinCV tool, I am going to give just a short summary about WinCV and its usage and how to use this tool more effectively for the programming

Before learning about the WinCV tool we will learn the real scenario

Many times while programming, will be blinking before the monitor without knowing the proper object or class available , then what’s the next step only Google its it right. How it will be if we have a tool that will allow you search for class the objects in the .net library yes we have the inbuilt tool called WinCV.exe which is available at C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin, just you can open the tool and type the class or object which you need to find out it will list out all the content the assembly name, field, Constructors, Properties, Events, Methods

Ok Then what to do if we have our own assembly and how to browse the objects in that .There is a web configuration file called WinCV.exe in the same location you can edit the configuration file and add your assembly in the tag [] then you can browse your assembly.