473,769 Members | 6,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Command Based Postback?

I need to be able to from C# launch a postback.

I have a command button that launches a function, I also have a javascript
function that then keeps you from firing any other objects on the page, but
when the function finishes the page needs to postback, but my function is in
codebehind.

What command do I need to call to say in my finnaly to postback my page???
--
D @ premierdata
Nov 19 '05 #1
4 1631
you can't directly. your client code needs to poll the server in some
fashion: iframe, xmlhttp or meta refresh. google this newsgroup for progress
bar for hints.

-- bruce (sqlwork.com)
"DE*********@on line.nospam" <de*********@on line.nospam> wrote in message
news:92******** *************** ***********@mic rosoft.com...
I need to be able to from C# launch a postback.

I have a command button that launches a function, I also have a javascript
function that then keeps you from firing any other objects on the page,
but
when the function finishes the page needs to postback, but my function is
in
codebehind.

What command do I need to call to say in my finnaly to postback my page???
--
D @ premierdata

Nov 19 '05 #2
What I am doing is a Response.WriteF ile that I can't have interupted.

What option do I have in this manner as one this file has finished
downloading the page needs to refresh to release my dataset.

There has to be a DotNet way of doing something like the meta-refresh.
--
D @ premierdata
"Bruce Barker" wrote:
you can't directly. your client code needs to poll the server in some
fashion: iframe, xmlhttp or meta refresh. google this newsgroup for progress
bar for hints.

-- bruce (sqlwork.com)
"DE*********@on line.nospam" <de*********@on line.nospam> wrote in message
news:92******** *************** ***********@mic rosoft.com...
I need to be able to from C# launch a postback.

I have a command button that launches a function, I also have a javascript
function that then keeps you from firing any other objects on the page,
but
when the function finishes the page needs to postback, but my function is
in
codebehind.

What command do I need to call to say in my finnaly to postback my page???
--
D @ premierdata


Nov 19 '05 #3
the .net way of meta-refresh is meta-refresh. you could release your dataset
after the filewrite.

not sure what you are trying to do, but probably you have a page, that
downloads a file, which you want to refresh when the file download is done.

this is done by by starting the download in another window (using client
script), then having the main page poll the backend for the download to be
complete (well close to done, as the backend only knows when the last
buffer was sent, not when the client received it). you will not want to use
the writefile method, because you will need to turn buffering off, and
update the status in the server (say in session or app object) after every
buffer write (say 2k buffers), so the polling page can see how far along the
download is.

-- bruce (sqlwork.com)
"DE*********@on line.nospam" <de*********@on line.nospam> wrote in message
news:58******** *************** ***********@mic rosoft.com...
What I am doing is a Response.WriteF ile that I can't have interupted.

What option do I have in this manner as one this file has finished
downloading the page needs to refresh to release my dataset.

There has to be a DotNet way of doing something like the meta-refresh.
--
D @ premierdata
"Bruce Barker" wrote:
you can't directly. your client code needs to poll the server in some
fashion: iframe, xmlhttp or meta refresh. google this newsgroup for
progress
bar for hints.

-- bruce (sqlwork.com)
"DE*********@on line.nospam" <de*********@on line.nospam> wrote in message
news:92******** *************** ***********@mic rosoft.com...
>I need to be able to from C# launch a postback.
>
> I have a command button that launches a function, I also have a
> javascript
> function that then keeps you from firing any other objects on the page,
> but
> when the function finishes the page needs to postback, but my function
> is
> in
> codebehind.
>
> What command do I need to call to say in my finnaly to postback my
> page???
> --
> D @ premierdata


Nov 19 '05 #4
Hi Dewright,

I think Bruce's suggestions are reasonable. As you mentioned that you'd
like to enforce the page to postback from clientside to server after the
serverside processing code finish, I'm not sure why don't you just let your
sequential code just execute after yoru former serverside code? Since let
the page return back to client and then postback will involve additional
round trip between client/server which has performance concerns.

In addition, if you do need to force a clientside postback(throug h code
behind serverside code), we can use the
Page.RegisterSt artupScript method to register a postback script to
clietnside.

#Page.RegisterS tartupScript Method
http://msdn.microsoft.com/library/en...webuipageclass
registerstartup scripttopic.asp ?frame=true

For example, we can register the document.form1. submit() to force the page
submit it self.

IF you have any further particular requirement or questions, please feel
free to let us know.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Bruce Barker" <br************ ******@safeco.c om>
| References: <92************ *************** *******@microso ft.com>
<OW************ *@TK2MSFTNGP14. phx.gbl>
<58************ *************** *******@microso ft.com>
| Subject: Re: Command Based Postback?
| Date: Wed, 13 Jul 2005 17:01:28 -0700
| Lines: 62
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <uk************ **@TK2MSFTNGP09 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: rdcsd1.safeco.c om 12.144.134.2
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP09.phx. gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:1120 75
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| the .net way of meta-refresh is meta-refresh. you could release your
dataset
| after the filewrite.
|
| not sure what you are trying to do, but probably you have a page, that
| downloads a file, which you want to refresh when the file download is
done.
|
| this is done by by starting the download in another window (using client
| script), then having the main page poll the backend for the download to
be
| complete (well close to done, as the backend only knows when the last
| buffer was sent, not when the client received it). you will not want to
use
| the writefile method, because you will need to turn buffering off, and
| update the status in the server (say in session or app object) after
every
| buffer write (say 2k buffers), so the polling page can see how far along
the
| download is.
|
| -- bruce (sqlwork.com)
|
|
| "DE*********@on line.nospam" <de*********@on line.nospam> wrote in message
| news:58******** *************** ***********@mic rosoft.com...
| > What I am doing is a Response.WriteF ile that I can't have interupted.
| >
| > What option do I have in this manner as one this file has finished
| > downloading the page needs to refresh to release my dataset.
| >
| > There has to be a DotNet way of doing something like the meta-refresh.
| > --
| > D @ premierdata
| >
| >
| > "Bruce Barker" wrote:
| >
| >> you can't directly. your client code needs to poll the server in some
| >> fashion: iframe, xmlhttp or meta refresh. google this newsgroup for
| >> progress
| >> bar for hints.
| >>
| >> -- bruce (sqlwork.com)
| >>
| >>
| >> "DE*********@on line.nospam" <de*********@on line.nospam> wrote in
message
| >> news:92******** *************** ***********@mic rosoft.com...
| >> >I need to be able to from C# launch a postback.
| >> >
| >> > I have a command button that launches a function, I also have a
| >> > javascript
| >> > function that then keeps you from firing any other objects on the
page,
| >> > but
| >> > when the function finishes the page needs to postback, but my
function
| >> > is
| >> > in
| >> > codebehind.
| >> >
| >> > What command do I need to call to say in my finnaly to postback my
| >> > page???
| >> > --
| >> > D @ premierdata
| >>
| >>
| >>
|
|
|

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
4757
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is like this: %@ Language=VBScript %> <!--#include file="includes/openconnection.asp"-->
8
4316
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image button at runtime: //----- Code snippet protected System.Web.UI.WebControls.PlaceHolder ImageHolder; private void Page_Load(object sender, System.EventArgs e)
1
2234
by: Klom Dark | last post by:
I've got a weird problem going on - I've got a table of dynamically created buttons. Each button has the X/Y value of the buttons position in the table assigned to it's CommandArgument property and the name of a common command (btn_Command) assigned to it's Command property. The creation of the table is done by a function called drawGeo. drawGeo is called during the initial Page_Load (!IsPostBack), but should be called by btn_Command on...
8
2174
by: moondaddy | last post by:
Is there a way to make the browser move back to the previous page via code behind on the server? The effect would be the same as the user clicking on the browser's back button. Thanks. -- moondaddy@nospam.com
7
1117
by: John Walker | last post by:
Hi, In order to have my application give the best performance, I'm trying to design my ASP.NET page where I will only have to populate my DataReader once. It is a simple application where we accept date range from the user, and any records in our SQL table, called SHIPMENTS, which has a value in a date field, called EXPORT_DATE, which falls in that date range will be deleted from the table. But the user would like to see a preview of the...
10
4621
by: Vi | last post by:
Hi, I'm trying to dinamically add LinkButton Controls to a web form. I do something like: for(i=1;i<=someVariable;i++) { LinkButton PageLink = new LinkButton(); PageLink.CommandName = i.ToString(); PageLink.Text = "Page " + i;
12
3175
by: Mats Lycken | last post by:
Hi, I'm creating a CMS that I would like to be plug-in based with different plugins handling different kinds of content. What I really want is to be able to load/unload plugins on the fly without restarting the application. What I did was to create an AppDomain that loaded the plugins and everything was great, until I tried to pass something else that strings between the domains...
0
6039
by: den 2005 | last post by:
Hi everybody, I am not familiar using Gridview, I created a Gridview with Edit Command Button, but when I click the update Command button this error message below is displayed, what and where is the problem? I am confused. Can anyone show me exactly to do edit process of Gridview using Edit Command button properly? Thanks. Error Message: Invalid postback or callback argument. Event validation is enabled using
4
2975
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a while and it seems it's not possible because the row that gets added with each click won't get recreated after a post back. After all the reading it seems that any dynamically created controls must be created in the Init event to be recreated after...
0
9424
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.