开发者

How to show/hide webforms ins aspnet?

Hide/Close Loginform.aspx if userid/password is correct then show newform.aspx and how to create message box开发者_运维知识库 on asp?That will pop up Message: Login Successfull.

Help please..I am exploring ASP net as a Beginner.

Thanks..

How can i get the username value from loginform.aspx to newforms.aspx so thati can also get its value for my sql queries insert/update.


In a web application scenario, if LoginForm.ASPX is your login web page, then on successful validation of your login credentials, there is no need to close / hide LoginForm.aspx.

All you need to do is navigate from this page to the next page i.e NewForm.aspx. Navigation from one page to another can be done by using a Server.transfer / Response.Redirect.

The equivalent of a messageBox (Windows Forms) in an Web Forms Scenario is done by using the "alert" function in Javascript. This can be controlled by using the RegisterClientScript facility for adding javascript to your NewForm.aspx to popup the alert on load.

In most login use cases, there is usually no need to show a message that the login was successful but if thats ur requirement, i would avoid using alerts in web applications as they are modal and hence tend to be a bit irritating - if all you are doing is just conveying information (in this case - that the login is successful). You may be better off just adding a message in your application header - if u have one / or a label at the top of NewForm.aspx showing that login was successfully done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜