问题标签 [asp.net-webcontrol]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1155 浏览

c# - RichHtmlField 在共享点内无法正确呈现

嘿,我有一个共享点页面,我让用户使用编辑模式来编辑页面的内容。

这是显示内容的显示面板

这是编辑内容的地方。

我遇到的问题是,当我进入页面内的编辑模式时,我可以很好地编辑内容,但保存后,如果我切换回显示模式,它只会显示 HTML 标签。标题将在标题之前显示强 html 标记,我正在获取 HTML 的来源而不是结果。有什么帮助吗?

谢谢 !

0 投票
1 回答
696 浏览

c# - aspxgridview 执行过滤后,aspxpopup 控件的高度没有变化

将 aspxgridview 放入 aspxpopup 控件。当在 aspxgridview 上执行过滤器时,该行将减少,但 aspxpopup 窗口的高度不会改变,并且底部会留空。这里有什么解决方案吗?或者这是错误?

0 投票
1 回答
1589 浏览

asp.net - 如何在 GridView RowDataBound 中获取附加参数

我有一个获取数据源的 GridView。现在在 RowDataBound 上,我需要对行单元格进行一些更改,但我需要外部信息来确定发生了什么更改。

我需要 isHarness bool,它在我创建和绑定网格时可用。此外,由于网格是在静态 WebMethod 调用期间创建的,因此我无法在页面上将其设为全局。

如何将 isHarness 的值获取到此函数中?我以为我可以创建自己的继承自 GridViewRowEventArgs 的 EventArgs,但我仍然不知道如何在我的新 args 中实际获取 bool ...

编辑

isHarness 是在创建 DataSource 时确定的布尔值,但不是 DataSource 的一部分

下面是外部调用的模拟:

0 投票
2 回答
1078 浏览

c# - C# search in a textfile words to a listbox

I have an ASP.NET ListBox that displays a list of activites taken from a text file. Now what I want to do is to search words, for example "hockey", entered by the user in a TextBox control, and display in the ListBox only the activities containing that search string.

0 投票
1 回答
1060 浏览

asp.net - 页面 Y.ascx 不能使用用户控件 X.ascx

我最近在我的 Web 应用程序中遇到了以下错误。

页面“ControlName.ascx”不能使用用户控件“OtherControl.ascx”,因为它在 web.config 中注册并与页面位于同一目录中。

虽然我能够通过移动控件并将其注册到页面中来修复错误,但我很好奇为什么会引发错误。

这显然是按照此处所述的设计设计的(黄色块向下 3/4),但我的问题是为什么?通过在 中注册控件Web.Config并将其放置在同一目录中,您可能会遇到什么问题?

0 投票
2 回答
427 浏览

asp.net - asp:HyperLink 未在浏览器上呈现

大家好,我遇到了这个奇怪的问题,asp:HyperLink控件没有在浏览器中呈现,它甚至不存在于发送到浏览器的最终 HTML 中。

Home.aspx Asp.net 标记

浏览器中的 Home.aspx

主页.aspx.cs

登录框管理器.cs

PS:我想我已经很好地解释了情况,让我知道任何细节。

0 投票
2 回答
1269 浏览

asp.net - 在 ASP.NET 中将 <%= %> 或 <%# %> 与 runat=server 一起使用

我有一个看起来像这样的网络控件

我想把这个 webcontrol 放在我的 aspx 页面中,如下所示:

(显然这段代码被简化以显示问题)

在我的 Render 方法中,变量 Fa.La.La 没有被评估。它以原始文本“<%= Fa.La.La %>”的形式出现我如何评估它?

我并不特别说明变量是如何传入的。如果变量以 <%# ... %> 的形式传入,则可以对其进行评估,那可以正常工作。关键是我有一些服务器端变量要在调用 Render() 方法之前/期间进行评估。

我唯一能想到的是使用正则表达式来获取 <%= ... %> 的内容并使用反射或其他东西,但必须有一种更优雅的方式来做到这一点。

这个问题与在带有 runat=server 的 href <%= xx %> 中使用服务器变量非常相似,但并不完全相同,因为那里的答案都没有用。

0 投票
0 回答
34 浏览

asp.net - After validating successfully, how to modify input for smarter displaying

My case is that I have a textbox for Age input. I use RegularExpressionValidator control to validate the input, like this:

The validation accepts digit inputs which maybe include whitespaces on the beginning or at the end of numbers. So if one user types " 32 " into the textbox, the input is legal. But afterwards I want the text box shows the better form, "32" - throw away all whitespaces.

I know it is possible to process by javascript, however is there a shorter way? or another more powerful validator control?

0 投票
1 回答
1706 浏览

asp.net - 在 asp.net WebService 中,将 WebControl 传递给 WebMethod

我正在使用 asp.net 4、C#、VS 2010。我遇到了一个问题,它调用了一个以 WebControl 作为参数的 Web 服务方法。

它编译没有错误。在运行时我收到此消息:

命名空间“namespace”中的 XML 元素“EnableTheming”已存在于当前范围中。使用 XML 属性为元素指定另一个 XML 名称或命名空间。

您能否解释一下为什么 webService 不接受 WebControl 以及如何处理这个问题?

0 投票
0 回答
112 浏览

asp.net-mvc-3 - 呈现 Web 服务器控件


有没有办法在运行时找出我的 Web 服务器控件正在运行的上下文?我需要在运行时知道 Web 服务器控件是否在 mvc 上下文或 Web 表单上下文中运行。