public void loadTeam() { Connection.Open_Connection(con); cmd = new SqlCommand("spLoadTeam", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@CategoryID", SqlDbType.SmallInt).Value = Convert.ToInt32(Request.QueryString["cid"]); cmd.Parameters.Add("@Limit", SqlDbType.Int).Value = 40; cmd.ExecuteNonQuery(); SqlDataAdapter ad = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); ad.Fill(dt); var design = ""; int j = 1; int i = 0; while (i < dt.Rows.Count) { var html = ""; html += "<div class='row'>"; html += "<div class='grid cs-style-4'>"; try { if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { //string username = StringCyper.Encrypt(dt.Rows[i]["UserName"].ToString(), "devnagar"); string username = dt.Rows[i]["UserName"].ToString(); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += " <span class='boxbottm'>"; html += " <img src='#' alt='Img' />"; html += " <span class='name'>" + dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString() + "</span>"; html += " <br />"; html += " <ul class='social-network nomargin'>"; html += " <li><a href='#' title='" + dt.Rows[i]["HoursBilled"].ToString() + "'><i class='icon-circled icon-time'></i></a></li>"; html += " <li><a href='#' title='" + dt.Rows[i]["RatingPoints"].ToString() + "'><i class='icon-circled icon-star-half-full'></i></a></li>"; html += " <li><a href='#' title='$-" + dt.Rows[i]["Rate"].ToString() + "'><i class='icon-circled icon-dollar'></i></a></li>"; html += " </ul>"; html += " </span>"; html += " </div>"; html += "</div>"; html += " </div>"; } ///2 /// i++; if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { string username = dt.Rows[i]["UserName"].ToString(); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += " <span class='boxbottm'>"; html += " <img src='#' alt='Img' />"; html += " <span class='name'>" + dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString() + "</span>"; html += " <br />"; html += " <ul class='social-network nomargin'>"; html += " <li><a href='#' title='" + dt.Rows[i]["HoursBilled"].ToString() + "'><i class='icon-circled icon-time'></i></a></li>"; html += " <li><a href='#' title='" + dt.Rows[i]["RatingPoints"].ToString() + "'><i class='icon-circled icon-star-half-full'></i></a></li>"; html += " <li><a href='#' title='$-" + dt.Rows[i]["Rate"].ToString() + "'><i class='icon-circled icon-dollar'></i></a></li>"; html += " </ul>"; html += " </span>"; html += " </div>"; html += "</div>"; html += " </div>"; } ///3 /// i++; if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { string username = dt.Rows[i]["UserName"].ToString(); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += " <span class='boxbottm'>"; html += " <img src='#' alt='Img' />"; html += " <span class='name'>" + dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString() + "</span>"; html += " <br />"; html += " <ul class='social-network nomargin'>"; html += " <li><a href='#' title='" + dt.Rows[i]["HoursBilled"].ToString() + "'><i class='icon-circled icon-time'></i></a></li>"; html += " <li><a href='#' title='" + dt.Rows[i]["RatingPoints"].ToString() + "'><i class='icon-circled icon-star-half-full'></i></a></li>"; html += " <li><a href='#' title='$-" + dt.Rows[i]["Rate"].ToString() + "'><i class='icon-circled icon-dollar'></i></a></li>"; html += " </ul>"; html += " </span>"; html += " </div>"; html += "</div>"; html += " </div>"; ///4 /// } i++; if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { string username = StringCyper.Encrypt(dt.Rows[i]["UserName"].ToString(), "devnagar"); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += " <span class='boxbottm'>"; html += " <img src='#' alt='Img' />"; html += " <span class='name'>" + dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString() + "</span>"; html += " <br />"; html += " <ul class='social-network nomargin'>"; html += " <li><a href='#' title='" + dt.Rows[i]["HoursBilled"].ToString() + "'><i class='icon-circled icon-time'></i></a></li>"; html += " <li><a href='#' title='" + dt.Rows[i]["RatingPoints"].ToString() + "'><i class='icon-circled icon-star-half-full'></i></a></li>"; html += " <li><a href='#' title='$-" + dt.Rows[i]["Rate"].ToString() + "'><i class='icon-circled icon-dollar'></i></a></li>"; html += " </ul>"; html += " </span>"; html += " </div>"; html += "</div>"; html += " </div>"; } } catch (IndexOutOfRangeException ex) { } html += "</div></div>"; design += html; j++; i++; } divProfile.InnerHtml = design; //HtmlGenericControl mydiv = (HtmlGenericControl)contractordesing; //mydiv.InnerHtml = design; Connection.Close_Connection(con); }
private void fill(DataTable dt) { var design = ""; int j = 1; int i = 0; while (i < dt.Rows.Count) { var html = ""; html += "<div class='row'>"; html += "<div class='grid cs-style-4'>"; try { if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { //string username = StringCyper.Encrypt(dt.Rows[i]["UserName"].ToString(), "devnagar"); string username = dt.Rows[i]["UserName"].ToString(); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += @" <span class='name'><b>"; html += dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString(); html += @"</b></span>"; html += @" <div class='row-fluid nomargin'> <div class='span2'><img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' alt='img' class='boxbottm' /></div>"; html += @" <div class='span8'>Score: "; html += dt.Rows[i]["RatingPoints"].ToString(); html += @"<br /> <a href='#'><i class='icon-circled icon-star nomargin'></i> <i class='icon-circled icon icon-star'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-empty'></i> </a> </div> <div class='span2' runat='server' id='varified' visible='false'>"; if (dt.Rows[i]["varified"].ToString() == "Yes") { html += @" <a href='#' class='verify'> <img src='images/verify.png' /> <span> <img class='callout' src='images/callout.gif' /> <strong>My Story</strong><br /> <i id='mystory' runat='server'></i> </span> </a>"; } html += @" </div> </div>"; html += " </div>"; html += "</div>"; html += "</div>"; } ///2 /// i++; if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { string username = dt.Rows[i]["UserName"].ToString(); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += @" <span class='name'><b>"; html += dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString(); html += @"</b></span>"; html += @" <div class='row-fluid nomargin'> <div class='span2'><img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' alt='img' class='boxbottm' /></div>"; html += @" <div class='span8'>Score: "; html += dt.Rows[i]["RatingPoints"].ToString(); html += @"<br /> <a href='#'><i class='icon-circled icon-star nomargin'></i> <i class='icon-circled icon icon-star'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-empty'></i> </a> </div> <div class='span2' runat='server' id='varified' visible='false'>"; if (dt.Rows[i]["varified"].ToString() == "Yes") { html += @" <a href='#' class='verify'> <img src='images/verify.png' /> <span> <img class='callout' src='images/callout.gif' /> <strong>My Story</strong><br /> <i id='mystory' runat='server'></i> </span> </a>"; } html += @" </div> </div>"; html += " </div>"; html += "</div>"; html += "</div>"; } ///3 /// i++; if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { string username = dt.Rows[i]["UserName"].ToString(); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += @" <span class='name'><b>"; html += dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString(); html += @"</b></span>"; html += @" <div class='row-fluid nomargin'> <div class='span2'><img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' alt='img' class='boxbottm' /></div>"; html += @" <div class='span8'>Score: "; html += dt.Rows[i]["RatingPoints"].ToString(); html += @"<br /> <a href='#'><i class='icon-circled icon-star nomargin'></i> <i class='icon-circled icon icon-star'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-empty'></i> </a> </div> <div class='span2' runat='server' id='varified' visible='false'>"; if (dt.Rows[i]["varified"].ToString() == "Yes") { html += @" <a href='#' class='verify'> <img src='images/verify.png' /> <span> <img class='callout' src='images/callout.gif' /> <strong>My Story</strong><br /> <i id='mystory' runat='server'></i> </span> </a>"; } html += @" </div> </div>"; html += " </div>"; html += "</div>"; html += "</div>"; ///4 /// } i++; if (string.IsNullOrEmpty(dt.Rows[i].ToString())) { } else { string username = StringCyper.Encrypt(dt.Rows[i]["UserName"].ToString(), "devnagar"); html += " <div class='span3'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += " <div class='boxgrid captionfull'>"; html += " <a href='Portfolio.aspx?id=" + username + "'>"; html += " <img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' class='attachment-home-post-thumbnail wp-post-image' alt='Your Crews Home' title='Your Crews Home' height='197' width='292'>"; html += " <span style='top: 200px;' class='cover boxcaption'>"; html += " <span class='descr'>Slider Javascript</span>"; html += " <span class='title'>" + dt.Rows[i]["JobTitle"].ToString() + "</span>"; html += " <span class='caption'>House, Banglow</span>"; html += " </span>"; html += " </a>"; html += " </div>"; html += @" <span class='name'><b>"; html += dt.Rows[i]["FirstName"].ToString() + " " + dt.Rows[i]["LastName"].ToString(); html += @"</b></span>"; html += @" <div class='row-fluid nomargin'> <div class='span2'><img src='" + dt.Rows[i]["PhotoURL"].ToString() + "' alt='img' class='boxbottm' /></div>"; html += @" <div class='span8'>Score: "; html += dt.Rows[i]["RatingPoints"].ToString(); html += @"<br /> <a href='#'><i class='icon-circled icon-star nomargin'></i> <i class='icon-circled icon icon-star'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-half-empty'></i> <i class='icon-circled icon icon-star-empty'></i> </a> </div> <div class='span2' runat='server' id='varified' visible='false'>"; if (dt.Rows[i]["varified"].ToString() == "Yes") { html += @" <a href='#' class='verify'> <img src='images/verify.png' /> <span> <img class='callout' src='images/callout.gif' /> <strong>My Story</strong><br /> <i id='mystory' runat='server'></i> </span> </a>"; } html += @" </div> </div>"; html += " </div>"; html += "</div>"; html += "</div>"; } } catch (IndexOutOfRangeException ex) { } html += "</div></div>"; design += html; j++; i++; } if (dt.Rows.Count == 0) { var html = ""; html += "<div class='row'>"; html += "<div class='grid cs-style-4'>"; html += " <div class='span12'> "; html += "<div class='team-box thumbnail'>"; html += " <div class='bigbox'>"; html += "<h2>No Crew Found In Search</h2>"; html += "</div></div></div>"; html += "</div></div>"; design += html; } divProfile.InnerHtml = design; }
protected void ibtnSearch_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("~/ProfileContractor/FindJob.aspx?category=" + StringCyper.Encrypt(ddlCategory.SelectedValue, "devnagar")); }