Tag Archives: tips

Increase Netbook Screen Resolution

Do you want to increase netbook screen resolution? The you can follow this simple steps but its only working on windows 7/Vista.

  1. Press WINDOW KEY + R this will open a Run Prompt
  2. On that Run Prompt type regedit
  3. Go find the registry for Display1_DownScalingSupported
  4. After find that change its value from 0 to 1
  5. FIN!

Just a note that the searching may take a little time. And remember that Increased resolution is just a software based emulation so expect that your screen will look somewhat funny after changing to a higher out of scope resolution.

Thanks,

Creating a file to Download dynamically in an https / SSL connection

Hi there, 

Here is a tip when you are programming something that you want your file’s path to be hidden. It’s specially when its under a secure connection or https or SSL connection.

  1. Remember the mime type ea. image/jpg
  2. Remember the file name ea. image.jpg
  3. Remember not to put expiration and no-cache on your header
  4. Remember to open it on another tab or window as much as possible
  5. When you are debugging you can remove the headers so the file won’t be downloaded

Hope this tips can help you specially #3 because your download will fail on lower version of IE.

Thanks,

A potentially dangerous Request.Form value was detected from the client

Have you ever experience the following error in ASP .NET?

A potentially dangerous Request.Form value was detected from the client 

Then you are one like me. Then you should now that one of the values of your elements (<inputs> or <button> or <textarea>) has html elements on it. Example is bellow:

<input type=’text’ name=’content’ value='<script language=”javascript”>alert(“Hello World!”);</script>’/>

Then you should also know that this error is persisting because the values given above might be an XSS attack. If you are sure that you want to accept this type of values on your dabatase you may explicitly remove this validation by adding this tag to your page’s masterpage or 1st line of tag.

validateRequest=”false”

If you are on ASP .NET MVC you can add this to your model, assuming that your model has the content variable.

[AllowHtml]
public string content = String.Empty;

Thanks hope it help you allot. Also if you are not familiar with XSS attacks, I will try to make an article for that so you can create your own script that is hack-able, be able to prevent it, and know what are it’s crons.

God Bless!

MS SQL Generate Script with Data

Here is a step on how you can make MS SQL Generate Script with Data.

  1. Open your Sql Server Management Studio.
  2. Select your database and right click on it follow just like what is in the image below. Refer to image 1
  3. Click Next until you when thru to the image below and click Advance. Refer to image 2
  4. Scroll down and until this row and update the value just like what is below. Refer to image 3
  5. Click Ok and next until you have generated the said script. Refer to image 4
  6. Now you have a create script that includes the schema at it’s data.

Tip on Website Structure

Greetings!

Just a few days ago I have encountered a Website Structure that made me really sad. Upon opening the folder I was shocked how was the file structure was handled. I think I can share how you should do the structuring of your files if your going to create a website with any programming language out of scratch.

  1. First group your files accordingly
    • You put all your javascript files inside a folder, let say js,  in which all javascript files are there and no where else. Inside it you can again group it accrdingly to what javascript its all about. If your using jquery put it under a js/jquery folder, if your using tinymce put it on js/tinymce, and so on.
    • The same thing goes to css and other files. Group them so you can easily find them
  2. Second, Use consistent file type
               If your going to use PNG use png in all cases. If your not using transparent images then use JPG.
  3. Lastly, Use naming conventions that you can easily remember

These aren’t all that you can do. But I can say that this can help in improving the readability of your website when you are giving over the development or getting help from another developer. Next time I will be giving some tips on coding on PHP.

Thanks,
Thomie Jose