如何使用当前用户(默认成员身份)作为 DetailsView 中的数据字段?

发布于 2024-09-13 07:34:48 字数 146 浏览 3 评论 0原文

我是 ASP.NET 新手。我的页面上有一个详细信息视图控件。我使用 linq 到 sql。我的详细信息视图是数据输入页面的管理面板。所以有些会员会把一些新闻输入到我的数据库中。我想使用“Writer”数据字段自动填充当前登录的用户。我怎样才能做到这一点?

谢谢

I am new to asp.net. I have a details view control on my page. I use linq to sql. My details view is an admin panel for data entry page. So some members will enter some news to my database. I want to use "Writer" Data Field to be filled automaticly with the current logged user. How can I do that?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

横笛休吹塞上声 2024-09-20 07:34:48

您只需在某个时候将用户名插入该字段即可。

对于这种情况,没有点击式拖放解决方案,并且有很多方法可以实现此目的,并且可能没有必要进一步详细介绍。

只需在提供页面时将值放入文本框或字段中,L2S 就可以在回发时获取该值。

You will simply need to inject the username into the field at some point.

There is not a point-n-click drag-n-drop solution to this case, and there are many ways to accomplish this and to go into further detail is likely not necessary.

Just get the value into the textbox or field as the page is served where L2S can pick it up on the postback.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文