Feeds:
Posts
Comments

Archive for January, 2007

 This is html code for  datalist
 <asp:DataList ID=”dlist” runat=”server” RepeatColumns=”3″ OnItemDataBound=”dlist_ItemDataBound”                                      Width=”681px” ItemStyle-HorizontalAlign=”Left”>
<ItemTemplate>       
  <asp:CheckBox ID=”chkBlogSites” runat=”server” />
</ItemTemplate>
</asp:DataList>
   
IN Code Behind OnItemDatabound Event look like
 protected void dlist_ItemDataBound(object sender, DataListItemEventArgs e){
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
// Here we get the reference of check box
   CheckBox lit = (CheckBox)e.Item.FindControl(“chkBlogSites”);
   if (lit != null)
{
//bind it with database field, in [...]

Read Full Post »

This is some code I used to fetch data from rss links  and insert to database.  Where _RssAgent is containing business logic, having getters, setters and function to insertion in database. you can implement as your requirement 
XmlDocument doc = new XmlDocument();
doc.Load(xmlPath);
//Get all Items in the XML file
//Get reference to the first author node in the XML file
XmlNodeList titleList = [...]

Read Full Post »

buddy here is regular expression for Url Vaildation
“http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?”
asp.net control would be look like
<asp:RegularExpressionValidator ID=”RegularExpressionValidator1″ ControlToValidate=”XYZl” ValidationExpression=”http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?” runat=”server” ErrorMessage=”Invalid URL”></asp:RegularExpressionValidator>
enjoy

Read Full Post »

Url Vaildator in asp.net

buddy here is regular expression for Url Vaildation
“http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?”
asp.net control would be look like
<asp:RegularExpressionValidator ID=”RegularExpressionValidator1″ ControlToValidate=”XYZl” ValidationExpression=”http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?” runat=”server” ErrorMessage=”Invalid URL”></asp:RegularExpressionValidator>
enjoy

Read Full Post »