Skip to main content

Posts

Show an animated gif onClientClick

To show an animated gif, something like loading onClientClick is a simple task. You just have to add a JavaScript function on the click event so the JS function will take care until the next page loads from the server. Inside the JS function we just have to hide the excising div and show the div which contains animated loading gif. I have done it and it works fine on every other browser except IE. On IE the gif is shown but it is not animated. I have to do some R&D and what I found was IE doesn't do anything like that when it is loading another page (communicating with server) and was commented as a feature limitation of IE. But there should be a way to do that, that's what I was thinking and I found a pretty simple way to do that. Here it is and if you have a better way please share it here. <div id="divProgress" runat="server">   </div> <div id="Div1" runat="server"> The web form comes here … </div>   The J...

Disable Back & RegEx Validation: JS

Disable Back on Browser: JavaScript I know disabling back button of a browser may cause usability issue. I have identified on some occasions we have to do it (what’s if client needs it). I have found some ways to do that but I preferred using a simple JavaScript. Here is the code. < script type ="text/javascript" > < !-- window.history.forward(1); //--> < / script > This should be put on the previous page to the page you wish to disable the back. This code will redirect user to the same page if he click back button. Regular expression validation on JavaScript I know it is very much easy to validate something on JavaScript by using Regular expressions but it is hard for me to remember the syntax to do it. I’m posting this for me to get when it is needed. J Here is the Code. < script type ="text/javascript" > < !-- function validateDate(source, clientside_arguments) { ...

Tips and Tricks on Blogging

Some of my friends who maintain blogs asked me what I am doing to maintain a blog. So I thought of writing a posting will be helpful than answering all the questions individually. I will list down almost all the tips and tricks that I can remember so far. Content : - When I am reading on how to make a good blog all the guys say that you should give good content (postings). How to write good content is the problem I face. What I am doing is I writing what I feel that hard to find using Google or if I found some new way or if I simply do something then I will write about that. And the main concern is to write more than 200 words on a posting otherwise Google will ignore it. More on boost blog traffic . Customizing the theme : - A blog theme should be customized. It is like a theory. Otherwise it will look like a same ordinary blog. The user who comes to read your blog should feel that you are out of (extra) ordinary. You can easily find some good themes by just searching on Google. More ...

What I visit most of the time

I was just thinking about what are the sites I’m visiting most of the time. So I thought to write something about them. I think a person can be understood better by the sites he is reading and visiting most of the time. So I think you can know more about me when I share my favorite list. Google : The best search engine I have ever used. It helps me a lot on finding almost anything. It helps me a lot. I don’t have to talk about this because anybody who reads this blog knows about Google. Yahoo mail : Yahoo mail is the mail I am using. There are 2 reasons for that. First it is free. Second no storage limit. FaceBook : Most of the time what I am doing in here is accepting friends and looking at the photos posted by friends. (normally I visit almost all the photos of the friends) DefenceWire (blog): This is a blog which posts about the current status of the war in Sri Lanka . There are a lot of comments so the time is spent more on reading...

User Controls vs. Custom Controls

The first thing I have to do in here is to apologise for not posting something on this blog for a long time. Yes it was really a long time without any posting. There were some reasons for that like I had to go abroad (still I am at Canada, and it is a big experience). So I was new in here had lot of work to do. Anyway I hope to post regularly now onwards.  I have been on 2 projects in here (web applications). On one project it was designed to do by using more “User Controls” and the other one was using “Custom Controls” so first of all I was pretty confused with mixing these two approaches. In my mind I was like in a war to identify what is the better approach and thought to write about those a little. User Controls  Basically a User Control is like a normal aspx page only different I can see is the file extension is as ascx . We can make a user control and it has a code behind also. We can just build this as a web page and treat it as a normal web page on aspx. So we can have pro...

How to use Google

I have seen a lot of my friends are using Google to find out the things. But I felt sometimes that they are not using the proper way to do that. So it takes a lot more time and lot more reading to find actually what we want. So I thought to find how to make our search better. I have found 2 sites that tell about that in more detailed. First is Google Search Help Center . It talks about the keywords that we can use with Google. I thing spending some time on this site will save a lot of time. Next is Google Guide . It tells you a lot more on search. Whether you are an expert or novice it doesn't matter on this site. I think even an expert can learn something in here. So I hope after referring these sites your ability on searching on Google will increase. And you will learn what Google can do. (It is lot more than just a search engine)  

How to get indexed by Google & Yahoo

I have seen a lot of ads and services online that provide the facility to get higher page ranks on search engines. But when I asked about those services on Google their respond was not much positive because they said it can decrease you page rank (because those services cannot be trusted always). It is happening because the page rank is depending on page visitors (as Google say). So the better way is to let the Google to index your site by sending them the address of your website. http://www.google.com/webmasters/ : here you can improve the traffic with the webmaster tools and you can send your website contents also. It is a legal, simple and direct hit. You can send your web site address (even the blog) to Yahoo: https://siteexplorer.search.yahoo.com also. It helps them to index your pages on their search engines. It is better to come up with the content and services which are really useful for the visitors and the traffic will be increased regularly. I have gone through a lot of e...