为了避免在我使用C#上传Asp.net中的任何文件时页面重新加载 [英] To avoid the Page reload when i am upload any file in Asp.net using C#

查看:63
本文介绍了为了避免在我使用C#上传Asp.net中的任何文件时页面重新加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用C#在Asp.net中上传任何文件时,如何避免页面重新加载?

How can i avoid the Page reload when i am upload any file in Asp.net using C#?

推荐答案

我可以为您提供一些链接,这些链接将为您提供有关避免页面刷新的想法,请仔细阅读:
防止C#刷新页面 [检测页面刷新 [如何防止在asp.net中刷新页面 [ ^ ]

这个问题已经在这个论坛上问过了;看看是否能从中获得帮助:
如何避免在上传文件时刷新页面 [ ^ ]
I can give you some links which will give you idea about avoiding page refresh please go through it:
Prevent Page Refresh in C#[^]
Detecting Page Refresh[^]
How to prevent page refresh in asp.net[^]

This question was already ask''d on this forum; see if you get some help from it:
how to avoid page refreshing while uploading file[^]



如果我没看错,那么您正尝试仅从页面文件上传中上传文件,并且上传后您不想重新加载页面.如果是,则尝试将您的内容(如文件上传控件)和一些其他动态值控件放在"UPDATE PANEL"(更新面板)中后应更新的内容.

要获得坚持,请访问以下链接:
http://www.asp.net/web-表格/教程/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers [ http://ajax.net-tutorials.com/controls/updatepanel-control/ [ ^ ]

如果否,则尝试发布有关您的问题的详细评论..

一切顺利.
Hi,
If I am not wrong then you are trying to upload a file from the page file upload only and after upload you don''t want to reload the page. If yes, then try to put your contents like file upload controls and some other dynamic valued controls which should be updated after uploading the files inside "UPDATE PANEL".

For assistence visit these links:
http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers[^]
http://ajax.net-tutorials.com/controls/updatepanel-control/[^]

If no then try posting comment with your problem in details..

All the best..


或者,您可以将jquery与C#处理程序一起使用来上传文件.不会引起任何回发.
Alternatively you can use jquery with a C# handler to upload a file. It will not cause any post back..


这篇关于为了避免在我使用C#上传Asp.net中的任何文件时页面重新加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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