• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# WebControls.HyperLink类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.UI.WebControls.HyperLink的典型用法代码示例。如果您正苦于以下问题:C# HyperLink类的具体用法?C# HyperLink怎么用?C# HyperLink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HyperLink类属于System.Web.UI.WebControls命名空间,在下文中一共展示了HyperLink类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: initPage

        protected void initPage()
        {
            RegistedUser MySelf = new RegistedUser();
            MySelf = (RegistedUser)Session["User"];
            MySelf.Userservice = new UserServiceClasses.RegisterUserService();
            List<Message> PublishMessageList =  MySelf.Userservice.GetUserUreadPublicMessages(MySelf.UserName);
            Panel single = new Panel();
            foreach (Message singleMessage in PublishMessageList)
            {

                HyperLink MessageFrom = new HyperLink();
                MessageFrom.Text = singleMessage.userFrom.NickName;
                MessageFrom.NavigateUrl = "~/WebPage/UserOwnZonePage/UserOwnZonePage/UserOwnZonePage.aspx?VisitedUserID=" + singleMessage.userFrom.UserName; ;
                single.Controls.Add(MessageFrom);
                Label MessageCon = new Label();
                MessageCon.Text = singleMessage.content;
                single.Controls.Add(MessageCon);

                ImageButton deleteButton = new ImageButton();
                deleteButton.ImageUrl = "~/newpng/Trash.png";
                deleteButton.Height = new Unit(48);
                deleteButton.ID = singleMessage.ID.ToString();
                deleteButton.OnClientClick += "DeleteItem";
                deleteButton.Click += new ImageClickEventHandler(deleteButton_Click);
                single.Controls.Add(deleteButton);

            }
            this.ALLPublicMessage.Controls.Add(single);
        }
开发者ID:xiasiliang-hit,项目名称:purchase_shop,代码行数:29,代码来源:UserPublicMessagePage.aspx.cs


示例2: AddAnchor

		protected virtual HyperLink AddAnchor(Control container, PluginContext context)
		{
			string tooltip = Utility.GetResourceString(GlobalResourceClassName, Name + ".ToolTip") ?? ToolTip;
			string title = Utility.GetResourceString(GlobalResourceClassName, Name + ".Title") ?? Title;
			string alternative = Utility.GetResourceString(GlobalResourceClassName, Name + ".AlternativeText") ?? AlternativeText;

			HyperLink a = new HyperLink();
			a.ID = "h" + Name;
			a.NavigateUrl = context.Rebase(context.Format(UrlFormat, true));
			a.SkinID = "ToolBarLink_" + Name;

			a.Target = Target;
			a.Attributes["class"] = Name + " " + RequiredPermission.ToString() + (string.IsNullOrEmpty(IconUrl) ? "" : " iconed");				
			if (UrlFormat.Contains("{"))
			{
				a.Attributes["class"] += " templatedurl";
				a.Attributes["data-url-template"] = context.Rebase(UrlFormat);
			}
			a.ToolTip = tooltip;
			a.Text = title;
			ApplyStyles(context, a);

			container.Controls.Add(a);
			return a;
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:25,代码来源:LinkPluginAttribute.cs


示例3: AddTo

        public override Control AddTo(Control container, PluginContext context)
        {
            var selector = context.Engine.Resolve<LanguageGatewaySelector>();
            if (!selector.Enabled || selector.LanguagesPerSite /*avoid showing options that might not be relevant */)
                return null;

            ILanguageGateway gateway = selector.GetAllLanguages();

            HtmlGenericControl div = new HtmlGenericControl("div");
            div.Attributes["class"] = "languages";
            container.Controls.Add(div);

            base.AddTo(div, context);

            foreach (ILanguage language in gateway.GetAvailableLanguages())
            {
                Url url = Engine.ManagementPaths.ResolveResourceUrl("{ManagementUrl}/Content/Globalization/Translate.aspx");
                url = url.AppendQuery("language", language.LanguageCode);
                url = url.AppendQuery(SelectionUtility.SelectedQueryKey + "={selected}");

                HyperLink h = new HyperLink();
                h.ID = language.LanguageCode.Replace('-', '_').Replace(' ', '_');
                h.Target = Targets.Preview;
                h.NavigateUrl = context.Rebase(context.Format(url, true));
                h.CssClass = "templatedurl language";
                h.ToolTip = language.LanguageTitle;
                h.Text = string.Format("<img src='{0}' alt=''/>", Url.ToAbsolute(language.FlagUrl));
                h.Attributes["data-url-template"] = context.Rebase(url);
                div.Controls.Add(h);
            }

            return div;
        }
开发者ID:GrimaceOfDespair,项目名称:n2cms,代码行数:33,代码来源:NavigationTranslationsPluginAttribute.cs


示例4: LoadSizes

		private void LoadSizes()
		{
			var imageConfig = Engine.Resolve<EditSection>().Images;
			string baseImagePath, imageSize;
			ImagesUtility.SplitImageAndSize(Selection.SelectedItem.Url, imageConfig.Sizes.GetSizeNames(), out baseImagePath, out imageSize);
			foreach (var size in imageConfig.Sizes.AllElements.Where(s => s.Announced))
			{
				var hl = new HyperLink();
				hl.ID = size.Name + "Size";
				bool exists;
				var path = ImagesUtility.GetExistingImagePath(Engine.Resolve<IFileSystem>(), baseImagePath, size.Name, out exists);
				if (exists)
				{
					var file = (SelectedFile.Parent as File) ?? SelectedFile;

					hl.NavigateUrl = "File.aspx?selected=" + file.GetChild(VirtualPathUtility.GetFileName(path)).Path;
					hl.Text = Utility.GetResourceString("ImageSizes", size.Name + ".Text") ?? (string.IsNullOrEmpty(size.Description) ? size.Name : size.Description);
					hl.Text += GetSizeText(size.Width, size.Height);
					hl.CssClass = "command";
					if (path == Selection.SelectedItem.Url)
						omSizes.Controls.AddAt(0, hl);
					else
						omSizes.Controls.Add(hl);
				}
			}
			omSizes.Visible = omSizes.Controls.Count > 1;
		}
开发者ID:meixger,项目名称:n2cms,代码行数:27,代码来源:File.aspx.cs


示例5: SetupLinks

        private void SetupLinks()
        {
            Panel pnlContent = unavContent;
            HyperLink linkToAdd;

            Image navDiv;

            Int32 controlsToAdd = 0;
            if (Page.Request.Url.ToString().ToLower().Contains("index")) { controlsToAdd++; } //We don't want to show the Home link if we are on home
            for (Int32 i = controlsToAdd; i < pageNames.Length; i++)
            {
                linkToAdd = new HyperLink();
                linkToAdd.NavigateUrl = pageLinks[i];
                linkToAdd.Text = linkText[i];
                if (Page.Request.Url.ToString().ToLower().Contains(pageNames[i]))
                {
                    linkToAdd.Attributes.Add("class", "unavon");
                }
                pnlContent.Controls.Add(linkToAdd);

                if (i < (pageNames.Length - 1))
                {
                    navDiv = new Image();
                    navDiv.ImageUrl = "../Images/nav_div.gif";
                    navDiv.AlternateText = string.Empty;
                    navDiv.Width = 1;
                    navDiv.Height = 17;
                    navDiv.BorderWidth = 0;
                    pnlContent.Controls.Add(navDiv);
                }
            }
        }
开发者ID:reydavid47,项目名称:GITHUB,代码行数:32,代码来源:unavPlaceHolder.ascx.cs


示例6: BuildCategoryPanel

        public static Panel BuildCategoryPanel(BlogEntry entry)
        {
            Panel categoriesPanel = new Panel();
            categoriesPanel.CssClass = "blogPostLabel";
            categoriesPanel.Style.Add(HtmlTextWriterStyle.TextAlign, "right");

            if (entry.Categories.Count > 0)
            {
                String category = entry.Categories[0];
                HyperLink hyperLink = new HyperLink();
                hyperLink.NavigateUrl = "blog.aspx?label=" + category;
                hyperLink.Text = category;
                categoriesPanel.Controls.Add(hyperLink);
            }

            for (int i = 1; i < entry.Categories.Count; i++)
            {
                String category = entry.Categories[i];
                Literal labelSeparator = new Literal();
                labelSeparator.Text = ", ";
                categoriesPanel.Controls.Add(labelSeparator);

                HyperLink hyperLink = new HyperLink();
                hyperLink.NavigateUrl = "blog.aspx?label=" + category;
                hyperLink.Text = category;
                categoriesPanel.Controls.Add(hyperLink);
            }

            return categoriesPanel;
        }
开发者ID:Letractively,项目名称:rpcwc,代码行数:30,代码来源:BlogHelper.cs


示例7: AddTo

		public override Control AddTo(Control container, PluginContext context)
		{
			if(!ActiveFor(container, context.State)) return null;
			if (context.Selected == null) return null;
			if (context.Selected.VersionOf.HasValue) return null;

			IEngine engine = Context.Current;
			//TODO: fixme, cause items to be deserialized always
			//ContentItem latestVersion = engine.Resolve<IVersionManager>().GetVersionsOf(context.Selected, 0, 1)[0];
			var draft = engine.Resolve<DraftRepository>().GetDraftInfo(context.Selected);
			if (draft == null)
				return null;
			var latestVersion = engine.Resolve<DraftRepository>().FindDrafts(context.Selected).Select(v => v.Version).FirstOrDefault();
			if (latestVersion == null)
				return null;

			Url versionPreviewUrl = engine.GetContentAdapter<NodeAdapter>(latestVersion).GetPreviewUrl(latestVersion);
			versionPreviewUrl = versionPreviewUrl.SetQueryParameter("edit", context.HttpContext.Request["edit"]);

			HyperLink hl = new HyperLink();
			hl.NavigateUrl = versionPreviewUrl;
			hl.Text = GetInnerHtml(context, latestVersion.State == ContentState.Waiting ? "{IconsUrl}/clock_play.png".ResolveUrlTokens() : IconUrl, ToolTip, Title);
			hl.CssClass = "preview";
			hl.ToolTip = Utility.GetResourceString(GlobalResourceClassName, Name + ".ToolTip") ?? context.Format(ToolTip, false);
			container.Controls.Add(hl);

			return hl;
		}
开发者ID:rohancragg,项目名称:n2cms,代码行数:28,代码来源:ControlPanelPendingVersionAttribute.cs


示例8: CreateControlLink

        public HyperLink CreateControlLink(DataControlFieldCell cell
            , String IdPropertyName
            , String controllerObjectName
            , String onClickClientEvent
            , String imageUrl
            , String altText
            , Int32 columnIndex
            , String businessKeyProperty
            )
        {
            GridViewRow row = (GridViewRow)cell.BindingContainer;
            if (row == null)
                return null;

            String value = GetObjectValue(row.DataItem, IdPropertyName);
            String businessKeyPropertyValue = GetObjectValue(row.DataItem, businessKeyProperty);

            if (String.IsNullOrEmpty(cell.Text) || String.Compare(cell.Text, "&nbsp;") == 0 ||
                    String.IsNullOrEmpty(value))
                return null;

            HyperLink link = new HyperLink();

            link.Text = cell.Text;
            link.NavigateUrl = GetNavigationUrl(value, businessKeyPropertyValue, controllerObjectName, onClickClientEvent, columnIndex);

            if (!String.IsNullOrEmpty(imageUrl))
                link.Controls.Add(CreateImage(imageUrl, altText));

            _navigateURL = link.NavigateUrl;
            _text = link.Text;
            _image = imageUrl;

            return link;
        }
开发者ID:Confirmit,项目名称:Portal,代码行数:35,代码来源:BoundSelectionFieldData.cs


示例9: PopulateCarousel

        private void PopulateCarousel()
        {
            List<BLCategory> categories = BLCategory.RetrieveListFromDB(connectionString);
            foreach (BLCategory category in categories)
            {
                Image image = new Image
                {
                    CssClass = "carousel-image",
                    ImageUrl = $"ImgHandler.ashx?categoryId={category.Id}"
                };
                HyperLink link = new HyperLink
                {
                    NavigateUrl = $"/Result.aspx?categoryId={category.Id}"
                };
                link.Controls.Add(image);

                Label captionLabel = new Label
                {
                    Text = $"<h3 style = 'color: #FFFFFF' > {category.Name} </ h3 >"
                };
                Panel captionPanel = new Panel { CssClass = "carousel-caption" };
                captionPanel.Controls.Add(captionLabel);

                Panel itemPanel = new Panel { CssClass = "item" };
                itemPanel.Controls.Add(link);
                itemPanel.Controls.Add(captionPanel);

                categoryCarousel.Controls.Add(itemPanel);
            }
        }
开发者ID:KodKnackarGanget,项目名称:E-Handel,代码行数:30,代码来源:Home.aspx.cs


示例10: fillCurriculumsList

        private void fillCurriculumsList()
        {
            CurriculumsTable.Rows.Clear();
            foreach (TblCurriculums curriculum in TeacherHelper.CurrentUserCurriculums())
            {
                TableRow curriculumRow = new TableRow();
                TableCell curriculumCell = new TableCell();
                HyperLink curriculumHyperLink = new HyperLink();
                curriculumHyperLink.Text = curriculum.Name;
                curriculumHyperLink.NavigateUrl = ServerModel.Forms.BuildRedirectUrl<TeachersListController>(
                    new TeachersListController { CourseId = -1, CurriculumId = curriculum.ID, BackUrl = RawUrl });
                curriculumCell.Controls.Add(curriculumHyperLink);
                curriculumRow.Cells.Add(curriculumCell);
                CurriculumsTable.Rows.Add(curriculumRow);
            }

            if (CurriculumsTable.Rows.Count == 0)
            {
                TableRow curriculumRow = new TableRow();
                TableCell curriculumCell = new TableCell();
                HyperLink curriculumLink = new HyperLink();
                curriculumLink.Text = noCurriculums;
                curriculumLink.NavigateUrl = ServerModel.Forms.BuildRedirectUrl<CurriculumEditController>
                    (new CurriculumEditController { BackUrl = RawUrl });
                curriculumCell.Controls.Add(curriculumLink);
                curriculumRow.Cells.Add(curriculumCell);
                CurriculumsTable.Rows.Add(curriculumRow);
            }
        }
开发者ID:supermuk,项目名称:iudico,代码行数:29,代码来源:TeacherObjectsController.cs


示例11: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {	
			if(Request.QueryString["filename"] == null)
        	{
				DirectoryInfo di = new DirectoryInfo(Server.MapPath("~/downloads"));
	        	int i = 0;
	        	
	        	foreach(FileInfo fi in di.GetFiles())
	        	{
	            	HyperLink HL = new HyperLink();
	            	HL.ID = "HyperLink" + i++;
	            	HL.Text = fi.Name;
	            	HL.NavigateUrl = Request.FilePath + "?filename="+fi.Name;
	            	ContentPlaceHolder cph = (ContentPlaceHolder)this.Master.FindControl("BodyContentPlaceholder");
	            	cph.Controls.Add(HL);
	            	cph.Controls.Add(new LiteralControl("<br/>"));
	        	}
        	}
        	else
        	{
        		string filename = Request.QueryString["filename"];
        		if(filename != null)
        		{
        			ResponseFile(Request, Response, filename, MapPath("~/Downloads/" + filename), 100);
        		}
        	}
        }
开发者ID:jclark434175,项目名称:WebGoat.NET,代码行数:27,代码来源:PathManipulation.aspx.cs


示例12: fillCoursesList

        private void fillCoursesList()
        {
            CoursesTable.Rows.Clear();
            foreach (TblCourses course in TeacherHelper.CurrentUserCourses())
            {
                TableRow courseRow = new TableRow();
                TableCell courseCell = new TableCell();
                HyperLink courseHyperLink = new HyperLink();
                courseHyperLink.Text = course.Name;
                courseHyperLink.NavigateUrl = ServerModel.Forms.BuildRedirectUrl<TeachersListController>(
                    new TeachersListController { CourseId = course.ID, CurriculumId = -1, BackUrl = RawUrl });
                courseCell.Controls.Add(courseHyperLink);
                courseRow.Cells.Add(courseCell);
                CoursesTable.Rows.Add(courseRow);
            }

            if (CoursesTable.Rows.Count == 0)
            {
                TableRow courseRow = new TableRow();
                TableCell courseCell = new TableCell();
                HyperLink courseLink = new HyperLink();
                courseLink.Text = noCourses;
                courseLink.NavigateUrl = ServerModel.Forms.BuildRedirectUrl<CourseEditController>
                    (new CourseEditController { BackUrl = RawUrl });
                courseCell.Controls.Add(courseLink);
                courseRow.Cells.Add(courseCell);
                CoursesTable.Rows.Add(courseRow);
            }
        }
开发者ID:supermuk,项目名称:iudico,代码行数:29,代码来源:TeacherObjectsController.cs


示例13: grdCurrentStud_RowDataBound

        protected void grdCurrentStud_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            e.Row.Cells[0].Visible = false;

            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //id="btnEdit" data-toggle="modal" data-target="#EditModal" runat="server" cssclass="btn  icon-edit" xmlns:asp="#unknown"

                string nStudentID = e.Row.Cells[0].Text;
                HyperLink lb = new HyperLink();
                lb.NavigateUrl = "#EditModal";
                lb.ID = "lbStudents";
                lb.Text = "View Details";

                //lb.Attributes.Add("ID", "lnkStudent");
                lb.Attributes.Add("data-id", nStudentID);
                lb.Attributes.Add("title", "Select");
                lb.Attributes.Add("class", "open-myModal btn-mini btn-primary");
                lb.Attributes.Add("data-target", "#EditModal");
                lb.Attributes.Add("data-toggle", "modal");
                lb.Attributes.Add("onclick", "CallGetData('" + nStudentID + "');");
                lb.Attributes.Add("runat", "server");

                e.Row.Cells[7].Controls.Add(lb);
            }
        }
开发者ID:MayurPawar89,项目名称:collegeWeb,代码行数:26,代码来源:ViewAllTPCStudent.aspx.cs


示例14: CreateCell

        private TableCell CreateCell(string title, string url, bool selected, string imageUrlS, string imageUrlL)
        {
            TableCell cell = new TableCell();
              Image img = new Image();
              if(selected)
              {
            img.ImageUrl = imageUrlL;
            img.Width = Unit.Pixel(40);
            img.Height = Unit.Pixel(20);
            Label lbl = new Label();
            lbl.Text = title;
            cell.Controls.Add(img);
            cell.Controls.Add(lbl);
              }
              else
              {
            img.ImageUrl = imageUrlS;
            img.Width = Unit.Pixel(20);
            img.Height = Unit.Pixel(10);
            HyperLink link = new HyperLink();
            link.Text = title;
            link.NavigateUrl = url;
            cell.Controls.Add(img);
            cell.Controls.Add(link);
              }

              return cell;
        }
开发者ID:bmadarasz,项目名称:ndihelpdesk,代码行数:28,代码来源:SearchMenu.ascx.cs


示例15: AddMethod

        private void AddMethod(Control parent, IRpcMethodDescriptor method)
        {
            JsonRpcObsoleteAttribute obsoleteAttribute = JsonRpcObsoleteAttribute.Get(method.AttributeProvider);

            Control methodSpan = AddSpan(parent, 
                obsoleteAttribute == null ? "method" : "method obsolete-method", null);
    
            HyperLink link = new HyperLink();
            link.CssClass = "method-name";
            link.Text = Server.HtmlEncode(method.Name);
            methodSpan.Controls.Add(link);

            AddSignature(methodSpan, method);
            string summary = JsonRpcHelpAttribute.GetText(method.AttributeProvider);

            if (summary.Length > 0)
            {
                AddSpan(parent, "method-summary-sep", " - ");
                AddSpan(parent, "method-summary", summary);
            }

            if (obsoleteAttribute != null)
            {
                AddSpan(parent, "obsolete-message", " This method has been obsoleted. " + obsoleteAttribute.Message);
            }
        }
开发者ID:BackupTheBerlios,项目名称:jayrock-svn,代码行数:26,代码来源:JsonRpcHelp.cs


示例16: GetDashboardLink

 /// <summary>
 /// Creates a link pointing to a tool visible in the dashboard.
 /// </summary>
 /// <param name="linkText">The text of the link.</param>
 /// <param name="toolValue">The value of the tool <c>QueryString</c> key for this tool.</param>
 /// <returns></returns>
 private HyperLink GetDashboardLink(string linkText, string toolValue)
 {
     HyperLink hl = new HyperLink();
     hl.NavigateUrl = this.BuildLinkUrl("&amp;mid=" + this.ModuleId + "&amp;ctl=admincontainer&amp;adminType=admintools&amp;tool=" + toolValue);
     hl.Text = linkText;
     return hl;
 }
开发者ID:EngageSoftware,项目名称:Engage-Publish,代码行数:13,代码来源:Dashboard.ascx.cs


示例17: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            session = (SessionObject)Session["SessionObject"];
            userid = session.LoggedInUser.UserId;
  
               
                if (Request.QueryString["StandardID"] != null && Request.QueryString["StudentID"] != null && Request.QueryString["WorksheetID"] != null)
                {
                    StandardId = Convert.ToInt32(Request.QueryString["StandardID"]);
                    StudentId = Convert.ToInt32(Request.QueryString["StudentID"]);
                    WorksheetId = Convert.ToInt32(Request.QueryString["WorksheetID"]);
                }
                if (!IsPostBack)
                {
                    radGridHistory.Visible = true;
                    radGridComments.Visible = true;
                    RadScriptManager scriptManager = (RadScriptManager)ScriptManager.GetCurrent(this.Page);

                    DataSet ds = CompetencyWorkSheet.GetCompetencyWorksheetSingleStudentStandard(StandardId, StudentId, WorksheetId);
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        lblStudentName.Text = ds.Tables[0].Rows[0]["StudentName"].ToString();
                        lblStandardDesc.Text = ds.Tables[0].Rows[0]["StandardDesc"].ToString();
                        StandardName = ds.Tables[0].Rows[0]["StandardName"].ToString();
                        lnkStandard.Text = StandardName;
                        HyperLink link = new HyperLink();
                        ID_Encrypted = Encryption.EncryptInt(StandardId);
                        link.NavigateUrl = "~/Record/StandardsPage.aspx?xID=" + ID_Encrypted;
                        lnkStandard.Attributes.Add("onclick", "window.open('" + link.ResolveClientUrl(link.NavigateUrl) + "');");
                        lnkStandard.Attributes.Add("style", "cursor:pointer; text-decoration: underline; color: #034AF3");
                        BindPerformanceGrid();
                        BindCommentGrid();
                    }
                }
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:35,代码来源:WorksheetHistory.aspx.cs


示例18: HyperLink

 void ITemplate.InstantiateIn(Control container)
 {
     HyperLink itemlbl = new HyperLink();
     itemlbl.Width = 110;
     itemlbl.DataBinding += new EventHandler(itemlbl_DataBinding);
     container.Controls.Add(itemlbl);
 }
开发者ID:BmanthaBernard,项目名称:AllUserWebPart,代码行数:7,代码来源:SiteLinkRender.cs


示例19: ButtonQuery_Click

 protected void ButtonQuery_Click(object sender, EventArgs e)
 {
     Table.Rows.Clear();
     List<Order> allOrders = OrderService.FindOrdersByStatusAndDate(Int32.Parse(DropDownListStatus.SelectedValue), Int32.Parse(DropDownListDate.SelectedValue));
     foreach (Order order in allOrders)
     {
         TableRow tr = new TableRow();
         TableCell tc = new TableCell();
         tc.Text = order.OrderSerialNumber.ToString();
         tr.Cells.Add(tc);
         tc = new TableCell();
         tc.Text = order.OrderID;
         tr.Cells.Add(tc);
         tc = new TableCell();
         tc.Text = order.UserID.ToString();
         tr.Cells.Add(tc);
         tc = new TableCell();
         tc.Text = order.ModiefiedDate.ToString();
         tr.Cells.Add(tc);
         tc = new TableCell();
         HyperLink hl = new HyperLink();
         hl.Text = "操作";
         hl.NavigateUrl = "/Admin/OrderInfo.aspx?orderID=" + order.OrderID;
         tc.Controls.Add(hl);
         tr.Cells.Add(tc);
         Table.Rows.Add(tr);
     }
 }
开发者ID:MYMMoonDT,项目名称:Vneed,代码行数:28,代码来源:OrderManagement.aspx.cs


示例20: OnLoad

        protected override void OnLoad(LoadModuleEventArgs e)
        {
            #if DEBUG
            Context.Trace.Write("StaticModule", "QueryString Edit Present: " + (Context.Request.QueryString["edit"] != null));
            #endif
            // checks to see if user is an administrator and is in edit mode
            if (Context.Request.QueryString["edit"] != null && IsInTask("Editor"))
                e.CenterTop.Add(new Edit());
            else
            {
                // add edit button for users with access to edit
                if (IsInTask("Editor"))
                {
                    HyperLink editLink = new HyperLink();
                    editLink.Text = "Edit This Page's Content";
                    editLink.NavigateUrl = Common.Path.GetPortalUrl("Edit.aspx").ToString();

                    // add link to page
                    e.CenterTop.AddAt(0, editLink);
                }

                // add body of page
                e.CenterTop.Add(new LiteralControl(this.Properties["Content"]));
            }
        }
开发者ID:nberardi,项目名称:omniportal,代码行数:25,代码来源:StaticModule.cs



注:本文中的System.Web.UI.WebControls.HyperLink类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.Image类代码示例发布时间:2022-05-26
下一篇:
C# WebControls.HiddenField类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap