30.6.08

Setting meta tags for content pages in ASP.NET 2.0

If you set the meta tags in the master page, all your pages will have the same meta tags.

Dim metaTag As New HtmlMeta
Dim HeadTag As HtmlHead = CType(Page.Header, HtmlHead)
metaTag.Attributes.Add("name", "description")
metaTag.Attributes.Add("content", "your description goes here")
HeadTag.Controls.Add(metaTag)
metaTag = New HtmlMeta
metaTag.Attributes.Add("name", "keywords")
metaTag.Attributes.Add("content", "your keyword go here")
HeadTag.Controls.Add(metaTag)

Insert and Update Query

IF EXISTS(
SELECT 1
FROM MY_TABLE
WHERE ITEM='somevalue' AND ENTERDATE='12/31/1999')
--Update Statement
UPDATE MY_TABLE
SET ITEM='anothervalue'
WHERE ITEM='somevalue' AND ENTERDATE='12/31/1999'
ELSE
--Insert Statement
INSERT INTO MY_TABLE
(ITEM, ENTERDATE)
VALUES
('somevalue', '12/31/1999')

Print button with javascript - fast and simple solution

The simplest way to print a web form is to use client side javascript. To print a web page, you can use code like this:

<input type="button" value="Print" onclick="window.print();">

This HTML code will return a Print button like bellow. You can click it to print this page.


for more information see this link :