вівторок, 16 березня 2010 р.

Закладки

Знайшов кілька закладок
http://www.searchlast.co.uk/blog/search-engine-optimisation/how-to-create-a-twitter-bookmark/

del.icio.us
<a href="http://del.icio.us/post?url=http://www.searchlast.
co.uk/blog/&title=Product+Price+Comparison+and+E-commerce
+News+Blog" >Del.icio.us</a>

Digg
<a href="http://digg.com/submit?url=http://www.searchlast.
co.uk/blog/&title=Product+Price+Comparison+and+E-commerce
+News+Blog" >Digg.com</a>

Reddit
<a href="http://reddit.com/submit?url=http://www.searchlast.
co.uk/blog/&title=Product+Price+Comparison+and+E-commerce+
News+Blog" >Reddit.com</a>

Facebook
<a href="http://www.facebook.com/sharer.php?u=http://www.
searchlast.co.uk/blog/">Facebook.com</a>

StumbleUpon
<a href="http://www.stumbleupon.com/submit?url=http://www.
searchlast.co.uk/blog/&title=Product+Price+Comparison+and
+E-commerce+News+Blog" >StumbleUpon.com</a>

Twitter
<a href="http://www.twitter.com/home?status=Currently+reading
+http://www.searchlast.co.uk/blog/" >Twitter.com</a>

Мій твіттер

Тепер і я в твіттері)))

http://twitter.com/khmurach

субота, 20 лютого 2010 р.

JavaScript: replace XML special characters


XmlHelper = {};

XmlHelper.getExp = function(str)
{
return new RegExp(str, 'g');
}

XmlHelper.encodeInvalidChars = function(str) {
return str
.replace(this.getExp('&'),'&amp;')
.replace(this.getExp('<'),'&lt;')
.replace(this.getExp('>'),'&gt;')
.replace(this.getExp('\''),'&apos;')
.replace(this.getExp('"'),'&quot;')
}
XmlHelper.decodeInvalidChars = function(str) {
return str
.replace(this.getExp('&amp;'),'&')
.replace(this.getExp('&lt;'),'<')
.replace(this.getExp('&gt;'),'>')
.replace(this.getExp('&apos;'),'\'')
.replace(this.getExp('&quot;'),'"')
}

четвер, 18 лютого 2010 р.

C#: replace XML special characters

System.Security.SecurityElement.Escape(string str);


  1. & - &amp;

  2. < - &lt;

  3. > - &gt;

  4. " - &quot;

  5. ' - &apos;

середа, 23 грудня 2009 р.

not null -> true and null -> false


select
CASE
when ImageFile is NULL then 0
else 1
end as HasImage
from News

Bind to ItemIndex

Repeater:
<% #DataBinder.Eval(Container, "ItemIndex") %>
Gridview:
<% #DataBinder.Eval(Container, "RowIndex") %>