如何在不更改网址的情况下更改内容 [英] how to change content without changing the url

查看:156
本文介绍了如何在不更改网址的情况下更改内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI专家,



是否有任何选项或任何方法,我有更改内容或表格或将一个页面移动到另一个页面而不刷新页面或更改url ..



我的客户在登录后需要一个网址并需要所有功能。



我使用带有c#的asp.net并且这个项目已经完成



这可能吗?

解决方案

1.在ASP.NET和/或使用网页显示多个页面而不更改URL或没有回发的任何Web应用程序中都不可能!



2.简而言之,Web应用程序的工作方式是,当用户单击链接或提交按钮时,表单中的用户输入将被发送到Web服务器(Web应用程序实际上正在运行),Web服务器处理用户请求,可以保存用户数据,最后将新页面或同一页面(在回发的情况下)呈现给Web浏览器在HTTP中。然后,Web浏览器使用新的HTTP数据显示新页面或将现有页面刷新给用户。



3.对于单页,可以使用与Web服务器通信以响应用户操作(如按钮单击)而不更改URL,如果使用AJAX调用则不刷新整个页面,但这仅适用于单页而不适用于多页!

网址将保持不变,但会有回发(刷新)

 Server.Transfer(  Default2.aspx); 





您可以将不同页面的内容放在div或面板中的单个页面中。根据需要显示或隐藏。


HI Experts ,

Is there any option or any method , i have change content or form or move one page to another without refreshing the page or change in the url ..

My client want a single url after login and need all the functionality .

I m using asp.net with c# and this project is done

is this possible??

解决方案

1.Is not possible in ASP.NET and or any web application that use web pages to show multiple pages without to change the URL or without postback!

2.In few words the web application are working in the way that when the user click on a link or a submit button, the user input from the form is send to the web server (were the web application is actually running), the web server is handle the user request, could save the user data, and finally render a new page or the same page (in the case of postback) to the web browser in HTTP fromat. Then the web browser use the new HTTP data to show the new page or to refresh the existing page to the user.

3.For a single page it is possible to communicate with the web server at response to user actions (like button click) without to change the URL and without to refresh the entire page if you are using AJAX call, but this works only into a single page not for multiple pages!


The url will be unchanged but there will be a postback(refresh)

Server.Transfer("Default2.aspx");


Hi,

You could put your contents of different pages in divs or panels in a single page. Show or Hide as necessary.


这篇关于如何在不更改网址的情况下更改内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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