问题标签 [asp.net-2.0]

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 投票
4 回答
7594 浏览

vb.net - 从插入语句返回一个值

使用 OLEDB 从 ASP.NET 2.0 (VB) 应用程序处理 Oracle 9i 数据库。有没有办法让插入语句返回一个值?我有一个序列设置为进入数据库时​​对条目进行编号,但我需要在插入后返回该值,以便我可以对刚刚在代码隐藏 VB 中输入的集合进行一些操作。

0 投票
7 回答
23933 浏览

asp.net-2.0 - 有没有一种简单的方法来清除 ASP.NET 表单?

有没有一种简单的方法可以重置 asp.net 表单中的所有文本字段——比如 html 控件的重置按钮?

0 投票
3 回答
1089 浏览

asp.net - 如何在 asp.net 2 中创建友好的 url

我尝试使用 IHttpModule 并设法将 url 转换得很好,但是我所有的图像都返回了路径错误(全部通过新的 url 目录)。

解决方案是什么?

0 投票
3 回答
3687 浏览

.net - ASP.net 2.0 GridView Columns dependant on multiple columns in the bound result set

I'm working with an ASP.net 2.0 GridView control that is bound to the results of a sql query, so it looks something like this:

As you can see, I'm displaying links with addresses in one of the columns (the one bound to the PublicIP field) using the format string:

Here's the problem: I need to use one of the other columns from the result set as well as the PublicIP column in my links, but I don't know how to make that available to my format string. I essentially need that column bound to two columns from the result set. To clarify, I need something like:

Where {1} is the value of my other column. Is there any way to accomplish this cleanly (even if it doesn't use format strings)? I've looked into using TemplateFields as well, but can see no easy way to do it with them either.

0 投票
1 回答
14044 浏览

asp.net - 错误 4005 表单身份验证失败 - 提供的票证已过期

我正在使用 ASP.NET 2.0 运行一个网站。时不时地(每天 100 多个用户每天 10 次以上)我收到此错误:表单身份验证失败 - 提供的票证已过期。

这是我的 web.config 片段:

我看过几个解决方案,有人提到会话超时,但在我的配置中也是 60 分钟。还有两件事,我没有运行 webfarm,并且在错误发生时应用程序没有被回收。

有什么线索吗?

0 投票
6 回答
2676 浏览

jquery - 用于 Asp.Net 2.0 的 Jquery 的 Ajax 属性

我总是在博客中看到这样的代码:

但我认为这仅适用于 asp.net 3.5。我无法使用 2.0 运行它。如何在我的应用程序中使用这些代码?

0 投票
2 回答
336 浏览

asp.net-2.0 - 如何使用 ASP.NET 修复我的 HTTP 处理程序和不同的主机标头?

当站点与 URL 一起使用时,test.com处理程序不会被触发。然而,如果该站点与www.test.com一起使用,处理程序是否可以正常工作?该站点位于 ISA 防火墙后面。我应该如何解决这个问题?

0 投票
4 回答
2910 浏览

css - ASP.Net LinkBut​​ton CSS 适配器

有谁知道用于 ASP.Net 2 的 LinkBut​​ton 控件的 CSS 适配器?

更新:

我们正在尝试使用 CSS 按钮。我们正在使用这种方法:http ://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html为此,我们需要呈现链接按钮不做的标签。

使用适配器的可能解决方案

我们为链接按钮创建了一个适配器。然后将 RenderContents 更改如下:

这似乎有效并且需要最少的努力。

0 投票
3 回答
2592 浏览

asp.net - 正确使用 ObjectDataSource

问候!

我正在创建一个将在 GridView 控件中显示数据的用户控件。我们使用的是 n 层架构,有问题的数据从我们的数据库中检索并作为 ReadOnlyCollection 返回给我们。OurNewObject 是一个包含多个属性和一个不带参数的空构造函数的类 - 它位于以下命名空间中:Acme.ObjectModel。

在用户控件中,我有以下内容:

在后面的用户控件代码中,我有以下公共方法:

当我将用户控件放在 Web 窗体上并运行它时,我收到以下消息:

ObjectDataSource 'ourDataSource' 找不到没有参数的非泛型方法 'GetTopUsers'。

所以我的问题是:

  1. 我是否错误地使用了 ObjectDataSource?
  2. 在这种情况下是否有更合适的方法来使用 ObjectDataSource?

谢谢。

0 投票
3 回答
408 浏览

asp.net-2.0 - 在 Asp.net 2.0 中如何、在哪里存储不同范围内的对象

需要问你一些帮助。

我有在 Net 2.0 中运行的网络应用程序。
我想问我应该为我的对象使用什么存储(缓存、会话、文件),因为它们有不同的使用范围。可以分为几组:
1)与访问者直接相关的对象(例如认证后收到的有关访问者的详细信息)
2)每个访问者使用的对象,因此它的应用范围(一些初始化数据,公共数据)

这些对象中的大多数都从 Web 服务获取数据,这很昂贵。

那么,考虑到速度、内存、可访问性以及我应该注意的其他方面,我的最佳选择是什么。

欢迎任何帮助。谢谢,X。