Using C# does anyone know how to build a list of Dynamic HTML links going down the page?
at the moment i'm using link buttons,but this is not very friendly when viewing the page on a mobile phone browser..Thanx in advance.
DataTable dtSite = GetSiteList(intTechId);
int i = 0;
foreach (DataRow row in dtSite.Rows)
strLink = getSiteName(Convert.ToInt32(row["SiteID"].ToString()));
TableRow tr = new TableRow();
TableCell tcLinkButton = new TableCell();
LinkButton linkButton = new LinkButton();
linkButton.ID = row["SiteID"].ToString();
linkButton.Text = strLink;
linkButton.Command += new CommandEventHandler(OnLinkClick);
linkButton.CommandName = row["SiteID"].ToString();
linkButton.CommandArgument = row["SiteID"].ToString();
You inherit a functionality. Interface does not gives you any kind of functionality. Even if I have a method say Sum in my interface, any class implementing it can write anything in the method definition. There is no way an interface can force you write code that will calculate sum if it has a method called sum.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
If Dog class implements IDog interface, then you can do something like:
IDog dog = new Dog();
I think this is what you are asking. You cannot "call" an interface directly. However, you can use an instance of an interface type to call a method provided the instance points to an object that implements that interface.
I would like to send emails to the clients in accordance with their choice (shopping), I would like it to be formatted, so I thought of HTML body however, it seems difficult to convert gridview datasource to HTML, Is there any easy way to reach the HTML source of a page and assign it to an HTML Text.