English 中文(简体)
a. 建立用户标识,在博客中发表意见
原标题:create a user login to comment in a blog
  • 时间:2012-04-14 21:46:02
  •  标签:
  • asp.net

I am working on a functionality in my website which should allow users to comment on a video or an image only after the user had logged in (very similar to the comment on a video after a sign in on YouTube). I have created the login control and a new user registration control using ASP controls. How do i integrate this to my comments.aspx page in which the user can view all previous comments that other users have commented but cannot comment until he signs in??? This is my login control:

        <asp:LoginName ID="LoginName1" runat="server" FormatString="welcome page {0}">
        </asp:LoginName><br />
        <asp:LoginStatus ID="LoginStatus1" runat="server" />
    </LoggedInTemplate>
    </asp:LoginView>

请提供帮助。

Jake

问题回答

您需要书写一个机制,检查用户是否为用户,并根据这一信息采取行动。 这样做有多种方法,例如,你可以改变对你的“后评论”纽扣的可见度。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签