本文整理汇总了C#中Data.BreakUpString方法的典型用法代码示例。如果您正苦于以下问题:C# Data.BreakUpString方法的具体用法?C# Data.BreakUpString怎么用?C# Data.BreakUpString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data
的用法示例。
在下文中一共展示了Data.BreakUpString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddAgendaItem
protected void AddAgendaItem(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
if (cookie == null)
{
cookie = new HttpCookie("BrowserDate");
cookie.Value = DateTime.Now.ToString();
cookie.Expires = DateTime.Now.AddDays(22);
Response.Cookies.Add(cookie);
}
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
AgendaItemTextBox.Text = dat.stripHTML(AgendaItemTextBox.Text.Trim());
AgendaDescriptionTextBox.Text = dat.stripHTML(AgendaDescriptionTextBox.Text.Trim());
if (AgendaItemTextBox.Text.Trim() != "")
{
AgendaLiteral.Text += "<div style=\"padding: 0px; padding-bottom: 3px;\" class=\"AddLink\">" +
dat.BreakUpString(AgendaItemTextBox.Text.Trim(), 44) + "</div>";
if (AgendaDescriptionTextBox.Text.Trim() != "")
{
AgendaLiteral.Text += "<div style=\"padding: 0px; padding-left: 20px; padding-bottom: 3px; color: #cccccc; font-family: arial; font-size: 11px;\">" +
dat.BreakUpString(AgendaDescriptionTextBox.Text.Trim(), 44) + "</div>";
}
}
else
{
AgendaErrorLabel.Text = "Must include the item title.";
}
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
TitleLabel.Text = title;
TitleLabel.NavigateUrl = "../" + dat.MakeNiceName(title) + "_" + eventID + "_Event";
summary = summary.Replace("<br/>", " ");
if (summary.Length > 70)
summary = dat.BreakUpString(summary.Substring(0, 70), 35) + "...";
OtherEventSummaryLabel.Text = summary;
PresentedByLabel.Text = "presented on " + presentedBy;
}
示例3: DrawEvents
protected void DrawEvents(DataView dvEvents, int cutOff)
{
string eventID = GetEventID();
HttpCookie cookie = Request.Cookies["BrowserDate"];
if (cookie == null)
{
cookie = new HttpCookie("BrowserDate");
cookie.Value = DateTime.Now.ToString();
cookie.Expires = DateTime.Now.AddDays(22);
Response.Cookies.Add(cookie);
}
DateTime isNow = DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"));
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
Literal lit = new Literal();
int count = 0;
DataView dvEvent;
string contentSub = "";
foreach (DataRowView row in dvEvents)
{
if (count > cutOff - 1)
{
break;
}
else
{
contentSub = dat.stripHTML(row["Content"].ToString().Replace("<br>",
"").Replace("</br>", "").Replace("<br/>", "").Replace("<BR>", "").Replace("<BR/>",
"").Replace("<br />", "").Replace("<BR />", ""));
if (dat.stripHTML(row["Content"].ToString().Replace("<br>",
"").Replace("</br>", "").Replace("<br/>", "").Replace("<BR>", "").Replace("<BR/>",
"").Replace("<br />", "").Replace("<BR />", "")).Length > 100)
contentSub = dat.stripHTML(row["Content"].ToString().Replace("<br>",
"").Replace("</br>", "").Replace("<br/>", "").Replace("<BR>", "").Replace("<BR/>",
"").Replace("<br />", "").Replace("<BR />", "")).Substring(0, 100);
dvEvent = dat.GetDataDV("SELECT * FROM Events E, Event_Occurance EO WHERE E.ID=EO.EventID AND E.ID=" + row["EventID"].ToString());
lit.Text += "<div class=\"SimilarSide\">";
lit.Text += "<a class=\"Blue12Link\" href=\"" + dat.MakeNiceName(row["Header"].ToString()) +
"_" + row["EventID"].ToString() + "_Event\">" + row["Header"].ToString() +
"</a> at " + "<a class=\"Green12LinkNF\" href=\"" + dat.MakeNiceName(row["Name"].ToString()) +
"_" + row["Venue"].ToString() + "_Venue\">" + row["Name"].ToString() + "</a> on " +
DateTime.Parse(dvEvent[0]["DateTimeStart"].ToString()).ToShortDateString() +
". " + dat.BreakUpString(contentSub, 30) +
"... <a class=\"Blue12Link\" href=\"" + dat.MakeNiceName(row["Header"].ToString()) +
"_" + row["EventID"].ToString() + "_Event\">Read More</a>";
lit.Text += "</div>";
count++;
}
}
OtherEventsPanel.Controls.Add(lit);
}
示例4: DrawBulletins
protected void DrawBulletins(DataView dvEvents, int cutOff)
{
string eventID = Request.QueryString["AdID"];
HttpCookie cookie = Request.Cookies["BrowserDate"];
if (cookie == null)
{
cookie = new HttpCookie("BrowserDate");
cookie.Value = DateTime.Now.ToString();
cookie.Expires = DateTime.Now.AddDays(22);
Response.Cookies.Add(cookie);
}
DateTime isNow = DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"));
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
Literal lit = new Literal();
int count = 0;
DataView dvEvent;
string contentSub = "";
foreach (DataRowView row in dvEvents)
{
if (count > cutOff - 1)
{
break;
}
else
{
contentSub = dat.stripHTML(row["Content"].ToString().Replace("<br>",
"").Replace("</br>", "").Replace("<br/>", "").Replace("<BR>", "").Replace("<BR/>",
"").Replace("<br />", "").Replace("<BR />", ""));
if (dat.stripHTML(row["Content"].ToString().Replace("<br>",
"").Replace("</br>", "").Replace("<br/>", "").Replace("<BR>", "").Replace("<BR/>",
"").Replace("<br />", "").Replace("<BR />", "")).Length > 100)
contentSub = dat.stripHTML(row["Content"].ToString().Replace("<br>",
"").Replace("</br>", "").Replace("<br/>", "").Replace("<BR>", "").Replace("<BR/>",
"").Replace("<br />", "").Replace("<BR />", "")).Substring(0, 100);
lit.Text += "<div class=\"SimilarSide\">";
lit.Text += "<a class=\"Green12LinkNF\" href=\"" + dat.MakeNiceName(row["Header"].ToString()) +
"_" + row["AdID"].ToString() + "_Ad\">" + row["Header"].ToString() +
"</a>. " + dat.BreakUpString(contentSub, 30) +
"... <a class=\"Blue12Link\" href=\"" + dat.MakeNiceName(row["Header"].ToString()) +
"_" + row["AdID"].ToString() + "_Ad\">Read More</a>";
lit.Text += "</div>";
count++;
}
}
OtherAdsPanel.Controls.Add(lit);
}
示例5: FillLiteral
//.........这里部分代码省略.........
HttpCookie cookie = Request.Cookies["BrowserDate"];
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
if (bool.Parse(isFeatured.Text))
{
FeaturedWeWouldPanel.Visible = true;
bool isBig = false;
if (AdPlacementList.SelectedValue == "0.04")
isBig = true;
FeaturedPreviewPanel.Visible = true;
int integer = 2;
string username = dat.GetDataDV("select * from Users where user_id=" + Session["User"].ToString())[0]["UserName"].ToString();
string email = "";
if (AdPictureCheckList.Items.Count == 0 || !AdMediaPanel.Visible)
email = GetEmailString(AdNameTextBox.THE_TEXT, null,
null, SummaryTextBox.InnerHtml, username, isBig, ref integer);
else
email = GetEmailString(AdNameTextBox.THE_TEXT, AdPictureCheckList.Items[0].Value,
null, SummaryTextBox.InnerHtml, username, isBig, ref integer);
if (!isBig)
email += "</tr>";
email = "<table>" + email + "</table>";
FeaturedPreviewLiteral.Text = email;
}
else
{
FeaturedWeWouldPanel.Visible = false;
}
EventPanel.Visible = true;
ShowHeaderName.Text = AdNameTextBox.THE_TEXT;
ShowDescription.Text = dat.BreakUpString(DescriptionTextBox.Content, 60);
Rotator1.Items.Clear();
char[] delim = { '\\' };
string[] fileArray;
string[] finalFileArray = new string[PictureCheckList.Items.Count];
if (System.IO.Directory.Exists(MapPath(".") + "\\UserFiles\\" +
Session["UserName"].ToString() + "\\AdSlider\\"))
{
fileArray = System.IO.Directory.GetFiles(MapPath(".") + "\\UserFiles\\" +
Session["UserName"].ToString() + "\\AdSlider\\");
}
//for (int i = 0; i < PictureCheckList.Items.Count; i++)
//{
// finalFileArray[i] = "http://" + Request.Url.Authority + "/HippoHappenings/UserFiles/" +
// Session["UserName"].ToString() + "/Slider/" + PictureCheckList.Items[i].Value;
//}
char[] delim2 = { '.' };
for (int i = 0; i < PictureCheckList.Items.Count; i++)
{
Literal literal4 = new Literal();
string[] tokens = PictureCheckList.Items[i].Value.ToString().Split(delim2);
if (tokens.Length >= 2)
{
if (tokens[1].ToUpper() == "JPG" || tokens[1].ToUpper() == "JPEG" || tokens[1].ToUpper() == "GIF")
{
System.Drawing.Image image = System.Drawing.Image.FromFile(MapPath(".") + "\\UserFiles\\" + Session["UserName"].ToString() + "\\AdSlider\\" + PictureCheckList.Items[i].Value.ToString());
int width = 410;
示例6: GetEmailString
protected string GetEmailString(string header, string picture, string ID, string description,
string userName, ref int normalAdCount, string templateID)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
DateTime isn = DateTime.Now;
if (!DateTime.TryParse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"), out isn))
isn = DateTime.Now;
DateTime isNow = isn;
Data dat = new Data(isn); string adtitle = "style=\"color: #7c7a7a;font-size: 14px;font-weight: bold;text-decoration: none;\"";
string adbody = "style=\"color: #7c7a7a;font-size: 12px;font-weight: normal;\"";
string readmorelink = "style=\"color: #09718F;text-decoration: none;cursor: pointer;\"";
string email = "";
string w = "";
string h = "";
if (normalAdCount % 2 == 0)
{
email += "<tr><td>";
}
else
{
email += "<td>";
}
email += "<div align=\"center\" style=\"position: relative;float: left;width: 198px; height: 262px;border: solid 1px #d9d6d6; " +
"margin-right: 2px; " +
"\">";
if (picture == null)
{
email += "<div style=\"padding-top: 10px; clear: both; padding-left: 1px;\">";
}
else
{
GetAdSize(out w, out h, picture, templateID);
if (templateID == "1")
{
email += "<div style=\"padding-top: 10px; clear: both; padding-left: 1px;\"><div style=\"float: left;padding-right: 2px;\"><table width=\"100px\" height=\"100px\" " +
"cellpadding=\"0\" cellspacing=\"0\"><tbody align=\"center\"><tr><td valign=\"middle\">";
}
else if (templateID == "2")
{
email += "<div style=\"padding-top: 10px; clear: both;\"><div style=\"float: left;padding-right: 2px;\"><table width=\"198px\" height=\"140px\" " +
"cellpadding=\"0\" cellspacing=\"0\"><tbody align=\"center\"><tr><td valign=\"middle\"> ";
}
else
{
email += "<div style=\"clear: both;\"><div center=\"float\" style=\"float: left;\"><table width=\"198px\" height=\"262px\" " +
"cellpadding=\"0\" cellspacing=\"0\"><tbody align=\"center\"><tr><td valign=\"middle\"> ";
}
if (ID == null)
{
email += "<img alt=\"" + header + "\" " +
"name=\"" + header + "\" width='" + w + "px' height='" + h + "px' src=\"./UserFiles/" +
userName + "/" + picture + "\" /></td></tr></tbody></table></div>";
}
else
{
email += "<a href=\"http://HippoHappenings.com/" + dat.MakeNiceName(header) + "_" + ID + "_Ad" +
"\" ><img style='border: 0;' alt=\"" + header + "\" " +
"name=\"" + header + "\" width='" + w + "px' height='" + h + "px' src=\"http://hippohappenings.com/UserFiles/" +
userName + "/" + picture + "\" /></a></td></tr></tbody></table></div>";
}
}
if (ID == null)
{
if (templateID == "1")
{
email += "<div><a class=\"Text14\">" + dat.BreakUpString(header, 10) +
"</a></div></div>" +
"<div align=\"center\" style=\"clear: both; padding-left: 2px; padding-right: 2px;" +
"padding-top: 1px;\"> " +
"<span class=\"Text12\">" +
dat.BreakUpString(description, 21) + "</span>" +
"</div>" +
"<div style=\"clear: none;\"><a class=\"ReadMoreHome2\">Read More</a>" +
"</div></div>";
}
else if (templateID == "2")
{
email += "</div><div style=\"padding-top: 5px; clear: both; padding-right: 4px;padding-left: 4px;\"><a class=\"Text14\">" +
dat.BreakUpString(header, 21) +
"</a></div>" +
"<div align=\"center\" style=\"clear: both; padding-left: 4px; padding-right: 4px;\"> " +
"<span class=\"Text12\">" +
dat.BreakUpString(description, 21) + "</span>" +
"</div>" +
"<div style=\"clear: none;\"><a class=\"ReadMoreHome2\">Read More</a>" +
"</div></div>";
}
}
else
//.........这里部分代码省略.........
示例7: Page_Load
//.........这里部分代码省略.........
LocationLabel.Text += cityID;
if (state != "")
LocationLabel.Text += ", " + stateID;
}
else
{
if (state != "")
LocationLabel.Text += stateID;
}
}
if (RadCalendar1.SelectedDate.ToShortDateString() != "1/1/0001")
LocationLabel.Text += " on " + RadCalendar1.SelectedDate.ToShortDateString();
}
ds = (DataSet)Session["HomeEvents"];
if (ds != null)
{
if (ds.Tables.Count > 0)
if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DateTime date = DateTime.Parse(ds.Tables[0].Rows[i]["DateTimeStart"].ToString());
ASP.controls_homeevent_ascx eventH = new ASP.controls_homeevent_ascx();
eventH.DAY = date.DayOfWeek.ToString().Substring(0, 3);
eventH.DAY_NUMBER = date.Day.ToString();
eventH.MONTH = dat.GetMonth(date.Month.ToString()).Substring(0, 3);
eventH.EVENT_NAME = ds.Tables[0].Rows[i]["Header"].ToString();
if (ds.Tables[0].Rows[i]["Content"].ToString().Length > 150)
eventH.SUMMARY = dat.BreakUpString(ds.Tables[0].Rows[i]["Content"].ToString().Substring(0, 150), 67) + "...";
else
eventH.SUMMARY = dat.BreakUpString(ds.Tables[0].Rows[i]["Content"].ToString(), 67) + "...";
eventH.EVENT_ID = int.Parse(ds.Tables[0].Rows[i]["EventID"].ToString());
EventPanel.Controls.Add(eventH);
}
}
else
{
Label label = new Label();
label.CssClass = "EventBody";
label.Text = "No events are listed for this date. Sorry. But perhaps you could enter one... <a class=\"AddLink\" href=\"BlogEvent.aspx\">Enter Events</a>.";
EventPanel.Controls.Add(label);
}
else
{
Label label = new Label();
label.CssClass = "EventBody";
label.Text = "No events are listed for this date. Sorry. But perhaps you could enter one... <a class=\"AddLink\" href=\"BlogEvent.aspx\">Enter Events</a>.";
EventPanel.Controls.Add(label);
}
}
else
{
Label label = new Label();
label.CssClass = "EventBody";
label.Text = "No events are listed for this date. Sorry. But perhaps you could enter one... <a class=\"AddLink\" href=\"BlogEvent.aspx\">Enter Events</a>.";
EventPanel.Controls.Add(label);
}
示例8: Page_Load
//.........这里部分代码省略.........
TopPanel.Width = 300;
PassedLink.Text = "| This event has passed";
}
else
{
TopPanel.Width = 125;
}
}
if (Request.QueryString["EventID"] == null)
Response.Redirect("~/Home.aspx");
string ID = eventID;
Session["EventID"] = ID;
DataSet ds = dat.GetData("SELECT * FROM Events WHERE ID=" + ID);
Session["FlagID"] = ID;
Session["FlagType"] = "E";
if (ds.Tables.Count > 0)
{
if (ds.Tables[0].Rows.Count > 0)
{
if (bool.Parse(ds.Tables[0].Rows[0]["Live"].ToString()))
{
if(ds.Tables[0].Rows[0]["BuyAtTix"] != null)
if (ds.Tables[0].Rows[0]["BuyAtTix"].ToString().Trim() != "")
{
BuyAtTix.Text = "<div style=\"position: relative;\"><div class=\"AddLink\" style=\"padding-top: 5px;float: left;\">Buy Tickets at: </div><a style=\"float: left;background-image: url(http://b1.perfb.com/b1.php?ID=14235&PURL=ticketsus.at/HippoHappenings); background-repeat: no-repeat; width: 110px; display: block; height: 50px; background-position: 0 -75px;\" target=\"_blank\" href=\"" +
ds.Tables[0].Rows[0]["BuyAtTix"].ToString() +
"\"></a></div>";
}
EventName.Text = "<a style=\"text-decoration: none; color: white;\" href=\"http://" + Request.Url.Authority + "/" +
dat.MakeNiceName(dat.BreakUpString(ds.Tables[0].Rows[0]["Header"].ToString(), 14)) +
"_" + ID.ToString() + "_Event\">" +
dat.BreakUpString(ds.Tables[0].Rows[0]["Header"].ToString(), 14) + "</a>";
Session["Subject"] = "Re: " + ds.Tables[0].Rows[0]["Header"].ToString();
Session["CommentSubject"] = "Re: " + ds.Tables[0].Rows[0]["Header"].ToString();
string UserName = ds.Tables[0].Rows[0]["UserName"].ToString();
DataSet dsDate = dat.GetData("SELECT * FROM Event_Occurance WHERE EventID=" + ID);
DataSet dsVenue = dat.GetData("SELECT * FROM Venues WHERE ID=" +
ds.Tables[0].Rows[0]["Venue"]);
TagCloud.THE_ID = int.Parse(ID);
NumberPeopleLabel.Text = dat.GetData("SELECT DISTINCT UserID FROM User_Calendar " +
"WHERE EventID=" + ID).Tables[0].Rows.Count.ToString() + " People";
if (Session["User"] != null)
{
DataSet dsFriends = dat.GetData("SELECT DISTINCT UC.EventID, UC.UserID FROM User_Friends UF, User_Calendar UC " +
"WHERE UC.EventID=" +
ID + " AND UC.UserID=UF.FriendID AND UF.UserID=" + Session["User"].ToString());
CommunicateLiteral.Text = "<img style=\"float:right;\" src=\"image/CommunicateButton.png\" onmouseover=\"this.src='image/CommunicateButtonSelected.png'\" onmouseout=\"this.src='image/CommunicateButton.png'\" onclick=\"javascript:OpenRad('" +
ID + "');\"/>";
int count = 0;
if (dsFriends.Tables.Count > 0)
if (dsFriends.Tables[0].Rows.Count > 0)
{
count = dsFriends.Tables[0].Rows.Count;
}
NumberFriendsLabel.Text = "(" + count.ToString() + " Friends)";
}
else
{
示例9: Page_Load
//.........这里部分代码省略.........
currentcount = CategoriesLiteral.Text.Length;
}
}
else
{
leftovercount += dscat.Tables[0].Rows[u]["Name"].ToString().Length + 1;
}
}
//if the list is too long, add a 'more' link drop down.
if (charReached)
{
string beginning = "<div>" + CategoriesLiteral.Text.Substring(0, currentcount - 1) +
" <a onclick=\"OpenCatDiv();\" id=\"morelessA\" class=\"AddWhiteLinkSmall\"> more...</a></div>";
int divHeight = leftovercount / 82;
if (divHeight == 0)
divHeight = 20;
else
divHeight = (divHeight + 1) * 20;
string hiddenDiv = "<div style=\"display: none;\" id=\"infoDiv\">" + divHeight.ToString() +
"</div><div style=\"height: 0px; border: 0; width: 420px;\" id=\"CatDiv\">" +
CategoriesLiteral.Text.Substring(currentcount, CategoriesLiteral.Text.Length - currentcount) + "</div>";
CategoriesLiteral.Text = beginning + hiddenDiv;
}
}
}
string theLink = "http://" + Request.Url.Authority + "/" +
dat.MakeNiceName(dat.BreakUpString(ds.Tables[0].Rows[0]["Name"].ToString(), 14)) +
"_" + ID.ToString() + "_Venue";
// DiggLiteral.Text = " <table> "+
// "<tr>"+
// "<td valign=\"bottom\" style=\"padding-right: 10px;\">"+
// "<a name=\"fb_share\" type=\"button\" href=\"http://www.facebook.com/sharer.php\">Share</a><script src=\"http://static.ak.fbcdn.net/connect.php/js/FB.Share\" type=\"text/javascript\"></script>"+
// "</td>"+
// "<td valign=\"bottom\" style=\"padding-right: 10px;\">"+
// " <a style=\"border: 0; padding: 0; margin: 0;\" id=\"TweeterA\" title=\"Click to send this page to Twitter!\" target=\"_blank\" rel=\"nofollow\"><img style=\"border: 0; padding: 0; margin: 0;\" src=\"http://twitter-badges.s3.amazonaws.com/twitter-a.png\" alt=\"Share on Twitter\"/></a>"+
// "</td>"+
// "<td valign=\"bottom\" style=\"padding-right: 10px;\">"+
// " <a href=\"javascript:void(window.open('http://www.myspace.com/Modules/PostTo/Pages/?u='+encodeURIComponent(document.location.toString()),'ptm','height=450,width=440').focus())\">"+
// " <img src=\"http://cms.myspacecdn.com/cms/ShareOnMySpace/small.png\" border=\"0\" alt=\"Share on MySpace\" />"+
// " </a>"+
// "</td>"+
// "<td valign=\"bottom\" style=\"padding-right: 10px;\"><a alt=\"Digg it!\" class=\"DiggThisButton DiggIcon\" id=\"dibbButt\"" +
// "href='http://digg.com/submit?phase=2&url=" + "http://" + Request.Url.Authority + "/" +
// dat.MakeNiceName(ds.Tables[0].Rows[0]["Name"].ToString()) +
// "_" + ID.ToString() + "_Venue" +
// "' target=\"_blank\">Digg</a></td> "+
// "<td valign=\"bottom\" style=\"padding-right: 10px;\">" +
// "<a href=\"http://delicious.com/save\" onclick=\"window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;\">" +
// " <img border=\"0\" src=\"http://static.delicious.com/img/delicious.small.gif\" height=\"10\" width=\"10\" alt=\"Delicious\" />" +
// "</a>" +
// "</td>" +
// "<td>" +
// " <script src=\"http://www.stumbleupon.com/hostedbadge.php?s=4\"></script>" +
// "</td>" +
// "</tr>" +
//"</table>";
示例10: Page_Load
//.........这里部分代码省略.........
LocationLabel.Text += cityID;
if (state != "")
LocationLabel.Text += ", " + stateID;
}
else
{
if (state != "")
LocationLabel.Text += stateID;
}
}
//if (RadCalendar1.SelectedDate.ToShortDateString() != "1/1/0001")
// LocationLabel.Text += " on " + RadCalendar1.SelectedDate.ToShortDateString();
}
ds = (DataSet)Session["HomeEvents"];
if (ds != null)
{
if (ds.Tables.Count > 0)
if (ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
DateTime date = DateTime.Parse(ds.Tables[0].Rows[i]["DateTimeStart"].ToString());
ASP.controls_homeevent_ascx eventH = new ASP.controls_homeevent_ascx();
eventH.DAY = date.DayOfWeek.ToString().Substring(0, 3);
eventH.DAY_NUMBER = date.Day.ToString();
eventH.MONTH = dat.GetMonth(date.Month.ToString()).Substring(0, 3);
eventH.EVENT_NAME = ds.Tables[0].Rows[i]["Header"].ToString();
if (ds.Tables[0].Rows[i]["Content"].ToString().Length > 150)
eventH.SUMMARY = dat.BreakUpString(ds.Tables[0].Rows[i]["Content"].ToString().Substring(0, 150).Replace("<br/>", " "), 67) + "...";
else
eventH.SUMMARY = dat.BreakUpString(ds.Tables[0].Rows[i]["Content"].ToString().Replace("<br/>", " "), 67) + "...";
eventH.EVENT_ID = int.Parse(ds.Tables[0].Rows[i]["EventID"].ToString());
EventPanel.Controls.Add(eventH);
}
}
else
{
Label label = new Label();
label.CssClass = "EventBody";
label.Text = "No events are listed for this date. Sorry. But perhaps you could enter one... <a class=\"AddLink\" href=\"BlogEvent.aspx\">Enter Events</a>.";
EventPanel.Controls.Add(label);
}
else
{
Label label = new Label();
label.CssClass = "EventBody";
label.Text = "No events are listed for this date. Sorry. But perhaps you could enter one... <a class=\"AddLink\" href=\"BlogEvent.aspx\">Enter Events</a>.";
EventPanel.Controls.Add(label);
}
}
else
{
Label label = new Label();
label.CssClass = "EventBody";
label.Text = "No events are listed for this date. Sorry. But perhaps you could enter one... <a class=\"AddLink\" href=\"BlogEvent.aspx\">Enter Events</a>.";
EventPanel.Controls.Add(label);
}
示例11: GetChart
protected void GetChart()
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
ConsumerRadChart.Series.Clear();
ConsumerRadChart.Clear();
ConsumerRadChart.PlotArea.Chart.Series.Clear();
ConsumerRadChart.PlotArea.XAxis.Clear();
ConsumerRadChart.PlotArea.YAxis.Clear();
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
string adID = AdDropDown.SelectedItem.Value;
DataView dvAd = dat.GetDataDV("SELECT * FROM Ads WHERE Ad_ID=" + adID);
DataView dvAdCategories = dat.GetDataDV("SELECT DISTINCT AC.Name, ACM.CategoryID FROM "+
"Ad_Category_Mapping ACM, AdCategories AC WHERE AC.ID=ACM.CategoryID AND ACM.AdID=" + adID);
TitleLabel.Text = "<span style=\"font-size: 30px;color: white;\">Statistics For Ad: <a href=\"" +
"http://" + Request.Url.Authority + "/" +
dat.MakeNiceName(dat.BreakUpString(dvAd[0]["Header"].ToString(), 14)) +
"_" + adID + "_Ad\" style=\"color: #1fb6e7; text-decoration: none;\">" +
dvAd[0]["Header"].ToString() + "</a></span><hr>";
TitleLabel.Text += "<table cellspacing=\"20px\"><tr valign=\"top\"><td>";
if (bool.Parse(dvAd[0]["BigAd"].ToString()))
TitleLabel.Text += "<br/><b>Ad Type: </b><span style=\"color: #1fb6e7; font-weight: bold;\">Big Ad</span>";
else
TitleLabel.Text += "<br/><b>Ad Type: </b><span style=\"color: #1fb6e7; font-weight: bold;\">Normal Ad</span>";
int totalViews = int.Parse(dvAd[0]["NumViews"].ToString());
int currentViews = int.Parse(dvAd[0]["NumCurrentViews"].ToString());
DataView dvAdStatistics = dat.GetDataDV("SELECT CASE WHEN UserID IS NULL THEN IP "+
"ELSE CONVERT(NVARCHAR,UserID) END AS theID, Reason, LocationOnly, Date, WasEmail "+
"FROM AdStatistics WHERE AdID=" + adID + " ORDER BY [Date] DESC");
DataView dvAdStatisticsCovert = dat.GetDataDV("SELECT CASE WHEN LocationOnly = 'True' THEN 'Location Only' " +
"WHEN WasEmail = 'True' THEN 'Email View' WHEN Reason = 'NonAssigned' THEN 'Non-Assigned User' " +
"ELSE dbo.GetCategories(Reason) END AS 'Reason', CASE WHEN LocationOnly = 'True' THEN 'Location Only' " +
"WHEN WasEmail = 'True' THEN 'Email View' WHEN Reason = 'NonAssigned' THEN 'Non-Assigned User' " +
"ELSE dbo.GetCategories(Reason) END AS 'Reason For View [Location Only, " +
"Non-Assigned User or list of Categories]', Date " +
"FROM AdStatistics WHERE AdID=" + adID + " GROUP BY [Date], UserID, IP, LocationOnly, WasEmail, Reason ORDER BY [Date] DESC");
string lastDayDay = "";
if (dvAdStatistics.Count > 0)
lastDayDay = DateTime.Parse(dvAdStatistics[0]["Date"].ToString()).Date.ToShortDateString();
dvAdStatistics.RowFilter = "WasEmail = 1";
int wasEmailCount = dvAdStatistics.Count;
int notEmailCount = currentViews - wasEmailCount;
dvAdStatistics.RowFilter = "";
if (currentViews < totalViews)
{
TitleLabel.Text += "<br/><b>Status: </b><span style=\"color: #1fb6e7; font-weight: bold;\">Ad is still running</span>";
TitleLabel.Text += "<br/><b>Number of Views Needed: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + totalViews.ToString() + "</span>";
TitleLabel.Text += "</td><td>";
TitleLabel.Text += "<br/><b>Number of Current Views: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + currentViews.ToString() + "</span>";
TitleLabel.Text += "<br/><b>Views by Email: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + wasEmailCount.ToString() + "</span>";
TitleLabel.Text += "<br/><b>Views on Site: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + notEmailCount.ToString() + "</span>";
TitleLabel.Text += "</td><td>";
TitleLabel.Text += "<br/><b>Display To All: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + dvAd[0]["DisplayToAll"].ToString() + "</span>";
TitleLabel.Text += "<br/><b>Display To Non-Users: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + dvAd[0]["NonUsersAllowed"].ToString() + "</span>";
TitleLabel.Text += "</td></tr></table>";
}
else
{
TitleLabel.Text += "<br/><b>Ad has finished running on:</b> <span style=\"color: #1fb6e7; font-weight: bold;\">" + lastDayDay + "</span>";
TitleLabel.Text += "</td><td>";
TitleLabel.Text += "<br/><b>Views by Email: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + wasEmailCount.ToString() + "</span>";
TitleLabel.Text += "<br/><b>Views on Site: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + notEmailCount.ToString() + "</span>";
TitleLabel.Text += "</td><td>";
TitleLabel.Text += "<br/><b>Display To All: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + dvAd[0]["DisplayToAll"].ToString() + "</span>";
TitleLabel.Text += "<br/><b>Display To Non-Users: </b><span style=\"color: #1fb6e7; font-weight: bold;\">" + dvAd[0]["NonUsersAllowed"].ToString() + "</span>";
TitleLabel.Text += "</td></tr></table>";
}
//Construct the chart
//for each entry in AdStatistics table for this particular ad
//get the number of different categories it was in
//One of the categories will be the location
//increment each category if exists in AdStatistics entry
//each category will have it's own series
ArrayList listOfCategories = new ArrayList(dvAdCategories.Count);
Hashtable hashOfCategories = new Hashtable();
char[] delim = { ';' };
string[] tokens;
//Get the hash of the count of all the categories of the reason why the ad was seen.
Literal ListofUsersLiteral = new Literal();
//ListofUsersLiteral.Text = "<table cellpadding=\"10px\" style=\"font-size: 12px;border: solid 1px #1fb6e7; background-color: #1b1b1b;\"><tr><td>" +
// "<span style=\"font-size: 14px; font-weight: bold;\"></span>"+
// "</td><td><span style=\"font-size: 14px; font-weight: bold;\">";
//LinkButton linkButt = new LinkButton();
//linkButt.Text = "Reason For View [Location Only, Non-Assigned User or list of Categories]";
//linkButt.Click += new EventHandler(SortReason);
//PanelofUsers.Controls.Add(linkButt);
//ListofUsersLiteral = new Literal();
//ListofUsersLiteral.Text = "</span>" +
//.........这里部分代码省略.........
示例12: DrawAd
protected void DrawAd(int nextAdIndex, DataView dvAds)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
DataView dvAd = dat.GetDataDV("SELECT * FROM Ads WHERE Ad_ID = " + dvAds[nextAdIndex]["Ad_ID"].ToString());
DataView dvUser = dat.GetDataDV("SELECT * FROM Users WHERE User_ID=" + dvAd[0]["User_ID"].ToString());
string templateID = dvAd[0]["Template"].ToString();
string w = "0";
string h = "0";
if (templateID == "1")
{
Template1Panel.Visible = true;
Template2Panel.Visible = false;
CustomerImage.AlternateText = dvAds[nextAdIndex]["Header"].ToString();
if (dvAds[nextAdIndex]["FeaturedPicture"].ToString() == "" || dvAds[nextAdIndex]["FeaturedPicture"] == null)
{
CustomerImage.Visible = false;
TitleLabel.Text = dat.BreakUpString(dvAds[nextAdIndex]["Header"].ToString(), 21);
}
else
{
CustomerImage.Visible = true;
GetAdSize(out w, out h, dvUser[0]["UserName"].ToString() + "\\" +
dvAds[nextAdIndex]["FeaturedPicture"].ToString(), templateID);
CustomerImage.ImageUrl = "../UserFiles/" + dvUser[0]["UserName"].ToString() +
"/" + dvAds[nextAdIndex]["FeaturedPicture"].ToString();
CustomerImage.Width = int.Parse(w);
CustomerImage.Height = int.Parse(h);
TitleLabel.Text = dat.BreakUpString(dvAds[nextAdIndex]["Header"].ToString(), 10);
}
TitleLabel.Text = dvAds[nextAdIndex]["Header"].ToString();
if (windowT)
{
TitleLabel.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad" + "');");
ReadMoreLink.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad" + "');");
A1.HRef = "javascript:CloseWindow('../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad');";
}
else
{
TitleLabel.NavigateUrl = "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad";
ReadMoreLink.NavigateUrl = "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad";
A1.HRef = "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad";
}
BodyLabel.Text = dat.BreakUpString(dvAds[nextAdIndex]["FeaturedSummary"].ToString(), 21);
}
else
{
Template1Panel.Visible = false;
Template2Panel.Visible = true;
Image1.AlternateText = dvAds[nextAdIndex]["Header"].ToString();
if (dvAds[nextAdIndex]["FeaturedPicture"].ToString() == "" || dvAds[nextAdIndex]["FeaturedPicture"] == null)
{
Image1.Visible = false;
}
else
{
GetAdSize(out w, out h, dvUser[0]["UserName"].ToString() + "\\" +
dvAds[nextAdIndex]["FeaturedPicture"].ToString(), templateID);
Image1.ImageUrl = "../UserFiles/" + dvUser[0]["UserName"].ToString() +
"/" + dvAds[nextAdIndex]["FeaturedPicture"].ToString();
Image1.Width = int.Parse(w);
Image1.Height = int.Parse(h);
}
if (windowT)
{
Image1.Attributes.Add("onclick", "CloseWindow('" + "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad" + "');");
}
else
{
Image1.Attributes.Add("onclick", "window.location = '" + "../" + dat.MakeNiceName(dvAds[nextAdIndex]["Header"].ToString()) +
"_" + dvAds[nextAdIndex]["Ad_ID"].ToString() + "_Ad" + "'");
}
}
if (Request.Url.AbsolutePath.ToLower() == "/group.aspx")
{
dat.CountGroupAds(int.Parse(dvAds[nextAdIndex]["Ad_ID"].ToString()));
}
else
{
if (Session["User"] != null)
{
dat.CountAd(true, dvAds);
}
else
{
//.........这里部分代码省略.........
示例13: Page_Load
//.........这里部分代码省略.........
else
{
Response.Redirect(dat.MakeNiceName(dvRealGroup[0]["Name"].ToString()) +
"_" + dvRealGroup[0]["ID"].ToString() + "_Group");
}
}
DateAndTimeLabel.Text = dvEvent[0]["DateTimeStart"].ToString() + " -- " + dvEvent[0]["DateTimeEnd"].ToString();
GroupLabel.Text = dvRealGroup[0]["Header"].ToString();
GroupLabel.NavigateUrl = dat.MakeNiceName(dvRealGroup[0]["Header"].ToString()) + "_" + dvRealGroup[0]["ID"].ToString() + "_Group";
Page.Title = dvGroup[0]["Name"].ToString() + " | Hippo Group Event";
if (!IsPostBack)
{
Session["RedirectTo"] = Request.Url.AbsoluteUri;
}
string country = dat.GetDataDV("SELECT * FROM Countries WHERE country_id=" + dvEvent[0]["Country"].ToString())[0]["country_name"].ToString();
Literal liter = new Literal();
liter.Text = "<link type=\"text/css\" href=\"Rads.css\" rel=\"stylesheet\" />";
Page.Header.Controls.Add(liter);
bool isMember = false;
#region Take care of user types
if (Session["User"] != null)
{
#region Take care of Share with friends and Share though email and Flag
LoggedInPanel.Visible = true;
ShareFriends.THE_TEXT = "Share this with a friend";
ShareFriends.RE_LABEL = "Re: " + Session["UserName"].ToString() +
" would like to share the group event '\"" + dat.BreakUpString(dvGroup[0]["Name"].ToString(), 14) +
"\"' with you.";
ShareFriends.TYPE = "ge";
ShareFriends.ID = int.Parse(Request.QueryString["ID"].ToString());
string descrip = dvGroup[0]["Content"].ToString();
if (descrip.Length > 200)
descrip = descrip.Substring(0, 200) + "...";
Session["messageEmail"] = "Group Event Name: <a href=\"http://hippohappenings.com/" +
dat.MakeNiceName(dat.BreakUpString(dvGroup[0]["Name"].ToString(), 14)) + "_" +
Request.QueryString["O"].ToString() + "_" +
Request.QueryString["ID"].ToString() + "_GroupEvent\">" +
dat.BreakUpString(dvGroup[0]["Name"].ToString(), 14) + "</a><br/><br/> " +
descrip;
Session["FlagID"] = Request.QueryString["ID"].ToString();
Session["FlagType"] = "GE";
Session["ReOccurID"] = Request.QueryString["O"].ToString();
DataView dvMember = dat.GetDataDV("SELECT * FROM Group_Members WHERE GroupID=" +
dvGroup[0]["GroupID"].ToString() + " AND MemberID=" + Session["User"].ToString());
PostMessageID.Attributes.Add("onclick", "OpenMess('" + Request.QueryString["ID"].ToString() +
"', '" + Request.QueryString["O"].ToString() + "')");
#endregion
switch (dvGroup[0]["EventType"].ToString())
{
case "1":
PrivateLabel.Text = "Public Event";
break;
case "2":
PrivateLabel.Text = "Private Event";
break;
示例14: DoAds
//.........这里部分代码省略.........
{
count++;
lit = new Literal();
lit.Text = "";
indexToUse = i + startIndex;
if (indexToUse > dvAds.Count - 1)
{
indexToUse = 0;
startIndex = -i;
}
if (dvAds[indexToUse]["Template"].ToString() == "1" || dvAds[indexToUse]["Template"].ToString() == "")
{
lit.Text = "<div align=\"center\" class=\"AdTemplate1\"><div align=\"center\" class=\"AdTemplate1Wrapper\">";
if (dvAds[indexToUse]["FeaturedPicture"] != null)
{
if (dvAds[indexToUse]["FeaturedPicture"].ToString().Trim() != "")
{
GetAdSize(ref w, ref h, dvAds[indexToUse]["UserName"].ToString() + "\\" +
dvAds[indexToUse]["FeaturedPicture"].ToString(), "1");
lit.Text += "<div class=\"AdTemplate1Inner\"><table width=\"100px\" height=\"100px\" " +
"cellpadding=\"0\" cellspacing=\"0\"><tbody align=\"center\"><tr><td valign=\"middle\"> " +
"<img alt=\"" + dat.MakeNiceNameFull(dvAds[indexToUse]["Header"].ToString()).Replace("-", " ") + "\" onclick=\"window.location = '../" + dat.MakeNiceName(dvAds[indexToUse]["Header"].ToString()) +
"_" + dvAds[indexToUse]["Ad_ID"].ToString() + "_Ad'\" class=\"AdImage\" width=\"" + w +
"px\" Height=\"" + h + "px\" src=\"UserFiles/" + dvAds[indexToUse]["UserName"].ToString() +
"/" + dvAds[indexToUse]["FeaturedPicture"].ToString() + "\" /> " +
"</td></tr></tbody></table></div>";
}
}
string headerStr = dat.BreakUpString(dvAds[indexToUse]["Header"].ToString(), 10);
lit.Text += "<div><h1 class=\"Text14\"><a class=\"AdsTitle\" href=\"../" + dat.MakeNiceName(dvAds[indexToUse]["Header"].ToString()) +
"_" + dvAds[indexToUse]["Ad_ID"].ToString() + "_Ad\">" + headerStr +
"</a></h1></div></div>" +
"<div align=\"center\" class=\"AdTemplate1InnerInner\"> " +
"<span class=\"Text12\">" +
dat.BreakUpString(dvAds[indexToUse]["FeaturedSummary"].ToString(), 21) + "</span>" +
"</div>" +
"<div><a class=\"ReadMoreHome\" href=\"../" +
dat.MakeNiceName(dvAds[indexToUse]["Header"].ToString()) +
"_" + dvAds[indexToUse]["Ad_ID"].ToString() + "_Ad\">Read More</a>" +
"</div></div>";
}
else if (dvAds[indexToUse]["Template"].ToString() == "2")
{
lit.Text = "<div align=\"center\" class=\"AdTemplate1\"><div class=\"AdTemplate2Wrapper\">";
if (dvAds[indexToUse]["FeaturedPicture"] != null)
{
if (dvAds[indexToUse]["FeaturedPicture"].ToString().Trim() != "")
{
GetAdSize(ref w, ref h, dvAds[indexToUse]["UserName"].ToString() + "\\" +
dvAds[indexToUse]["FeaturedPicture"].ToString(), "2");
lit.Text += "<div class=\"AdTemplate1Inner\"><table width=\"198px\" height=\"140px\" " +
"cellpadding=\"0\" cellspacing=\"0\"><tbody align=\"center\"><tr><td valign=\"middle\"> " +
"<img alt=\"" + dat.MakeNiceNameFull(dvAds[indexToUse]["Header"].ToString()).Replace("-", " ") + "\" onclick=\"window.location = '../" + dat.MakeNiceName(dvAds[indexToUse]["Header"].ToString()) +
"_" + dvAds[indexToUse]["Ad_ID"].ToString() + "_Ad'\" class=\"AdImage\" width=\"" + w +
"px\" Height=\"" + h + "px\" src=\"UserFiles/" + dvAds[indexToUse]["UserName"].ToString() +
"/" + dvAds[indexToUse]["FeaturedPicture"].ToString() + "\" runat=\"server\" /> " +
"</td></tr></tbody></table></div>";
}
示例15: RadScheduler1_AppointmentCreated
protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
{
HttpCookie cookie = Request.Cookies["BrowserDate"];
string venueID = Request.QueryString["ID"].ToString();
char[] delim = { ';' };
string[] tokens = e.Appointment.ID.ToString().Split(delim);
string aptmntID = tokens[0];
string reOcurrID = tokens[2];
string switchOn = tokens[1];
Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
DateTime dateNow = DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":"));
DataSet ds = dat.GetData("SELECT DATEADD(minute,450,EO.DateTimeStart) AS Start, DATEADD(minute,450,EO.DateTimeEnd) AS [End], E.Header, " +
"E.ID, E.Address, V.Name FROM Venues V, Events E, Event_Occurance EO WHERE E.Venue=V.ID AND " +
"EO.EventID=E.ID AND V.ID=" + venueID);
DataView dv = new DataView(ds.Tables[0], "ID=" + aptmntID, "", DataViewRowState.CurrentRows);
e.Appointment.ToolTip = "";
RadToolTip newToolTip = new RadToolTip();
string address = "";
DateTime date = e.Appointment.Start;
newToolTip.Text = "<div width=\"250px\" id=\"divE" + aptmntID + "\"><a href=\"" +
dat.MakeNiceName(e.Appointment.Subject) + "_" +
aptmntID + "_Event\" class=\"NavyLink12\">" +
dat.BreakUpString(e.Appointment.Subject, 20) + "</a>" +
"<br/>" + date.ToShortTimeString();
if (Session["User"] != null)
{
DataView dvUser = dat.GetDataDV("SELECT * FROM User_Calendar WHERE UserID=" +
Session["User"].ToString() + " AND EventID=" + aptmntID);
newToolTip.Text += "<br/><a href=\"javascript:OpenRad2('divE" + aptmntID + "','" +
aptmntID + "', 'E', " + reOcurrID + ");\"><img title=\"Send info to friends\" alt=\"Send info to " +
"friends\" style=\"border: none;\" " +
"src=\"image/Envelope.png\" /></a>";
string addText = "";
if (dvUser.Count > 0)
{
e.Appointment.BackColor = System.Drawing.Color.Yellow;
newToolTip.Text = "<span style=\"color: orange;\">Event is in your calendar</span>" +
newToolTip.Text + "</div>";
}
else
{
newToolTip.Text += "<a style=\"text-decoration: none;\" " +
"href=\"javascript:AddToCalendar('divE" + aptmntID + "','" +
aptmntID + "', 'E');\"><img style=\"padding-bottom: 4px; border: 0;\" " +
"title=\"Add to Calendar\" alt=\"Add to Calendar\" " +
"src=\"image/CalendarIcon.png\" /></a></div>";
}
}
else
newToolTip.Text += "</div>";
newToolTip.TargetControlID = e.Appointment.ClientID;
newToolTip.IsClientID = true;
newToolTip.ManualClose = true;
newToolTip.HideEvent = ToolTipHideEvent.ManualClose;
newToolTip.Animation = ToolTipAnimation.None;
newToolTip.AutoCloseDelay = 100000000;
newToolTip.HideDelay = 1000000;
newToolTip.ShowEvent = ToolTipShowEvent.OnClick;
newToolTip.Position = ToolTipPosition.MiddleRight;
newToolTip.Width = 250;
newToolTip.Skin = "Sunset";
ToolTipPanel.Controls.Add(newToolTip);
}