Wednesday, March 2, 2011

How to create a link just for running Javascript, no postback

Two ways
<a href="#" onclick="Function();">Click to Run</a>
<a href="javascript:void(0)" onclick=" Function ();">Click to Run </a>

  

Tuesday, March 1, 2011

Understanding Response/Request class in ASP.NET from HTTP point of view

Understanding Response/Request class in ASP.NET from HTTP point of view
HTTP is on the top of layers, Application. 




Hypertext Transfer Protocol -- HTTP/1.1

ClientIDMode is a big help for JQuery in ASP.NET WebForms


Problem:
Client ID for a server side tag is generated dynamically in ASP.NET, particularly in user control.
This way will make inconvenience for JQuery selector. 
Solution:
There is a new attribute in ASP.NET 4, ClientIDMode to solve this problem, Especially, Static and Predicable modes

Monday, February 28, 2011

How to Build an RSS Feed with ASP.NET

http://net.tutsplus.com/tutorials/asp-net/how-to-build-an-rss-feed-with-asp-net/

PDF viewer, How to display PDF or MS Office documents in web page without installed client software

How to display PDF or MS Office documents in web page without installed client software?
Google Docs viewer
Example code:
<html><body>
<iframe src="http://docs.google.com/viewer?url=per.lacity.org%2Fexams%2Fchromeissue.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>
</body></html>