DataSet dsGetAssortmentType = new DataSet();
DataSet dsGetMarketContent = new DataSet();
HtmlGenericControl divDetails = new HtmlGenericControl("DIV");
string strMarketdata = "";
dsGetAssortmentType = AssortmentBuilderDB.fnGetAssortmentItemType();
string strSelectedType = ddlCoverDriverandDoc.SelectedItem.Text;
if (dsGetAssortmentType.Tables.Count > 0)
{
for (int i = 0; i < dsGetAssortmentType.Tables[0].Rows.Count; i++)
{
if (strSelectedType == dsGetAssortmentType.Tables[0].Rows[i]["AssortmentMasterName"].ToString()) {
AssortmentType = Convert.ToChar(dsGetAssortmentType.Tables[0].Rows[i]["AssortmentMasterNameType"].ToString()[0]);
}
}
}
dsGetMarketContent = AssortmentBuilderDB.fnGetAssortmentImageByAssortmentType(portalSettings.PortalID, intItemID, AssortmentType);
if (dsGetMarketContent.Tables.Count > 0)
{
if (dsGetMarketContent.Tables[0].Rows.Count > 0)
{
strMarketdata = "<div style='background-color:white;'>";
for (int i = 0; i < dsGetMarketContent.Tables[0].Rows.Count; i++)
{
string Path = GlobalVariables.ImageBasePath + dsGetMarketContent.Tables[0].Rows[i]["UploadedFilePath"].ToString();
strMarketdata += "<img src='" + Path + "'/>";
divDetails.InnerHtml = strMarketdata;
}
divDetails.InnerHtml += "</div>";
PlaceHolderSelectImage.Controls.Add(divDetails);
}
}
---------------------------------------------------------------------------------------
This is my code for bind image dynamically in page load,7 i have 1 image control in .aspx page code like <image id="imgdisplay" runat="server"/>
now if i click on dynamically created image ,then that particular imageshould display in hardcoded"imgdisplay" tag..
you can give me code in either asp.net or javascript..pls help me.