Sunday, October 30, 2011
How to get web site url in asp.net
Monday, June 8, 2009
AdSense for domains
AdSense for domains allows publishers with unused domains to help users reach relevant information by presenting content on the domains.
Users often type domains into their address bar or follow expired links leading to sites with no content. Instead of an "under construction" page or 404 error, AdSense for domains provides links, search results, advertisements and other content. To do this, we use semantic technology targeted to the domain name. You earn revenue when users interact with the ads on your site.
If you have a site that has content on it (e.g., articles, reviews, forums, blog postings or other text), then your site should be used with AdSense for content. If you have a page with no content on it, then AdSense for domains can help your users. To get started with AdSense for domains, check out our set-up instructions, or search or browse our AdSense Help Forum for more information.
Use the Google Chart API to create charts for your web applications
Although it is simple to use (just a darn URL after all) you will see that there are many options.
Here is just a few charts to show how broad this is:
Line Chart
http://chart.apis.google.com/chart?cht=lxy&chs=200×125&chd=t:0,30,60,70,90,95,100|20,30,40,50,60,70,80|10,30,40,45,52|100,90,40,20,10|-1|5,33,50,55,7&chco=3072F3,ff0000,00aaaa&chls=2,4,1&chm=s,FF0000,0,-1,5|s,0000ff,1,-1,5|s,00aa00,2,-1,5
Bar Charts
http://chart.apis.google.com/chart?cht=bvg&chs=200×125&chd=s:hello,world&chco=cc0000,00aa00
Pie Charts
http://chart.apis.google.com/chart?cht=p3&chd=s:Uf9a&chs=200×100&chl=Rails|PHP|Java|.NET
Venn Diagrams
http://chart.apis.google.com/chart?cht=v&chs=200×100&chd=t:100,80,60,30,30,30,10
Scatter
http://chart.apis.google.com/chart?cht=s&chd=s:984sttvuvkQIBLKNCAIi,DEJPgq0uov17zwopQODS,AFLPTXaflptx159gsDrn&chxt=x,y&chxl=0:|0|2|3|4|5|6|7|8|9|10|1:|0|25|50|75|100&chs=200×125
Solid Fill
http://chart.apis.google.com/chart?cht=lc&chd=s:pqokeYONOMEBAKPOQVTXZdecaZcglprqxuux393ztpoonkeggjp&chco=FF0000&chls=4.0,3.0,0.0&chs=200×125&chxt=x,y&chxl=0:|Jun|July|Aug|1:||20|30|40|50&chf=bg,s,efefef
Wednesday, May 13, 2009
Turn the submit button off when it press in ASP.Net
![]() |
| Disable button after clicking |
Here is button control to add <form> tag.
Put the following code to code-behind as below.
this.Button1.Attributes.Add("onclick", "this.value='Please wait...';this.disabled = true;"
+ Page.ClientScript.GetPostBackEventReference(this.Button1, ""));
//Here go on for click event
Now, click the button every times, it disable itself and user don't have a chance to press the button double.
How to limit the text length as maximum with Javascript (Text Counter)
<script type="text/javascript">
function textCounter(field, countfield, maxlimit)
{
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
</script>
Here is form tag.
<form>
<span>Comments:</span>
<span>Only 200 char allowed</span>
<textarea id="comment" onblur="this.style.backgroundColor='#ffffff'" onfocus="this.style.backgroundColor='#FFFCF9'" onkeyup="textCounter(comment,textCount,200);" onkeydown="textCounter(comment,textCount,200);" rows="7" cols="60" name="comment" style="background-color: rgb(255, 255, 255);">
</textarea>
<input type="text" value="200" maxlength="3" size="3" id="textCount" name="textCount"/>
<span>Char count</span>
</form>
That's it. Enjoy the JScript!
