Showing posts with label Validations. Show all posts
Showing posts with label Validations. Show all posts

Wednesday, May 22, 2013

Hide Unncessary space when Validator messages are not firing....

While working on validator controls, we need to give some text message to display. When we give a text message many times space is getting created to show validator message....

When validators are not firing that time this space doesn't look good....

To hide this unnecessary space when validator message is not firing set

Display property to Dynamic

i.e. Display="dynamic"

Submit this story to DotNetKicks

Read more...

Tuesday, July 31, 2012

Check if the page is in iframe

There is a common requirement while developing iframe based web application i.e. redirect if the page is not in iframe or redirect main page to login page or any default page if the page is not opened with in iframe.
In such case; if some one tries to open page using URL; we need to check if the page is in iframe or not, if it is not in iframe we have to perform desired action. 
We can use following javascript to perform this checking and if the page is not in iframe redirect it to default page.

Submit this story to DotNetKicks

Read more...