如何获取成功用户注册的弹出消息,单击确定后,他将被重定向到包含显示用户详细信息的数据库信息的页面。 [英] How to get a pop up message for sucessful user registration and upon clicking OK ,he will be redirected to a page containing Database info which shows user details.

查看:188
本文介绍了如何获取成功用户注册的弹出消息,单击确定后,他将被重定向到包含显示用户详细信息的数据库信息的页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('User Successfully Registered');window.location='Manager.aspx';", true);





这会将用户重定向到页面,显示所有现有用户的记录。



This will redirect the user to a page which shows the records of all the existing users.

推荐答案

您需要一个页面,显示单个用户的详细信息,从查询字符串中获取要显示的用户ID ,然后你更新你的代码去那;



You need a page that shows the details for a single user, getting the user id to show from the querystring, then you update your code to go to that;

ClientScript.RegisterStartupScript(Page.GetType(), "Message", "alert('User Successfully Registered');window.location='UserDetails.aspx?UserID=" + userID + "';", true);





其中UserDetails是显示数据的页面,userID是您刚刚添加的人的ID \\amended。 UserDetails将使用Request.QueryString [UserID]来获取要显示的详细信息的ID。请记住安全问题,任何人都可以在浏览器中请求该页面,因此您需要确保发出请求的人有权查看该数据。



Where UserDetails is the page that shows the data and userID is the ID of the person you've just added\amended. UserDetails will use Request.QueryString["UserID"] to get the ID of the details to show. Bear in mind security issues, anyone can request that page in the browser so you need to ensure the person making the request is authorised to see that data.


这篇关于如何获取成功用户注册的弹出消息,单击确定后,他将被重定向到包含显示用户详细信息的数据库信息的页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆