473,221 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

ObjectDataSource update using callback instead of postback

It would be udeful to be able to get the current on-screen values from a
FormView that is databound to an ObjectDataSource by using a callback instead
of a postback. For example:

public void RaiseCallbackEvent(string eventArgs)
{
// update the data object with the values currently on screen
FormView1.UpdateItem(true);
}

In an ordinary postback, such as a button click handler, calling UpdateItem
would force a call to the following business class update method, and the obj
parameter would contain the values currently on screen:

public static void Update(MyBusinessClass obj)
{
// validate, store, etc. here
}

However, if I call UpdateItem in RaiseCallbackEvent, then the obj parameter
in the business class update method will not have been updated with the
values the user has just typed in the form.

Jim
Nov 19 '05 #1
4 3361
Hi Jim,

We have reviewed this issue and are currently researching on it. We will
update you ASAP. Thanks for your patience!

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Nov 19 '05 #2
Hi Jim,

As for ASP.NET script callback, its request (call back to serversdie...) is
different from our normal post back request. For performance consideration,
some of the normal processing in the server request have been bypassed in
scrpit call back. Such as the Control Tree constructing and populating and
some normal postback data processing and events other than the script call
back. So we don't recommend that our serverside script call back function
will have any code logic which rely on the page's control model. Is you'd
like to do data updating, it is recommended, that we use Sqlconnection and
SqlComand and executing the command separately and return the executing
result to clientside whicn will be better.

Thanks,

Steven Cheng
Microsoft Online Support

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


--------------------
| Thread-Topic: ObjectDataSource update using callback instead of postback
| thread-index: AcXnHkNwxKAJxANARKu4/LaAlXQNYA==
| X-WBNR-Posting-Host: 209.137.235.2
| From: "=?Utf-8?B?SmltIEhhbW1vbmQ=?=" <Ji**************@nospam.nospam>
| Subject: ObjectDataSource update using callback instead of postback
| Date: Fri, 11 Nov 2005 16:16:01 -0800
| Lines: 24
| Message-ID: <6E**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:357527
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| It would be udeful to be able to get the current on-screen values from a
| FormView that is databound to an ObjectDataSource by using a callback
instead
| of a postback. For example:
|
| public void RaiseCallbackEvent(string eventArgs)
| {
| // update the data object with the values currently on screen
| FormView1.UpdateItem(true);
| }
|
| In an ordinary postback, such as a button click handler, calling
UpdateItem
| would force a call to the following business class update method, and the
obj
| parameter would contain the values currently on screen:
|
| public static void Update(MyBusinessClass obj)
| {
| // validate, store, etc. here
| }
|
| However, if I call UpdateItem in RaiseCallbackEvent, then the obj
parameter
| in the business class update method will not have been updated with the
| values the user has just typed in the form.
|
| Jim
|

Nov 19 '05 #3
Is it possible to update the viewstate on the server from the client for just
the one formview control - ideally without doing a postback? Is it possible
to update the entire viewstate on the server from the client without doing a
postback?

Please elaborate on "executing the command separately". Note that the goal
is to get updated data FROM the form rather than sending updated data TO the
form.

Thanks,

Jim

"Steven Cheng[MSFT]" wrote:
Hi Jim,

As for ASP.NET script callback, its request (call back to serversdie...) is
different from our normal post back request. For performance consideration,
some of the normal processing in the server request have been bypassed in
scrpit call back. Such as the Control Tree constructing and populating and
some normal postback data processing and events other than the script call
back. So we don't recommend that our serverside script call back function
will have any code logic which rely on the page's control model. Is you'd
like to do data updating, it is recommended, that we use Sqlconnection and
SqlComand and executing the command separately and return the executing
result to clientside whicn will be better.

Thanks,

Steven Cheng
Microsoft Online Support

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


--------------------
| Thread-Topic: ObjectDataSource update using callback instead of postback
| thread-index: AcXnHkNwxKAJxANARKu4/LaAlXQNYA==
| X-WBNR-Posting-Host: 209.137.235.2
| From: "=?Utf-8?B?SmltIEhhbW1vbmQ=?=" <Ji**************@nospam.nospam>
| Subject: ObjectDataSource update using callback instead of postback
| Date: Fri, 11 Nov 2005 16:16:01 -0800
| Lines: 24
| Message-ID: <6E**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:357527
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| It would be udeful to be able to get the current on-screen values from a
| FormView that is databound to an ObjectDataSource by using a callback
instead
| of a postback. For example:
|
| public void RaiseCallbackEvent(string eventArgs)
| {
| // update the data object with the values currently on screen
| FormView1.UpdateItem(true);
| }
|
| In an ordinary postback, such as a button click handler, calling
UpdateItem
| would force a call to the following business class update method, and the
obj
| parameter would contain the values currently on screen:
|
| public static void Update(MyBusinessClass obj)
| {
| // validate, store, etc. here
| }
|
| However, if I call UpdateItem in RaiseCallbackEvent, then the obj
parameter
| in the business class update method will not have been updated with the
| values the user has just typed in the form.
|
| Jim
|

Nov 19 '05 #4
Hi Jim,

Thanks for your respones. As for ViewState, I'm afraid this is not
updatable from external code. Actually, the script call back event at
serverside just provide an interface for us to make a post back to client
without refreshing the client browser view. However the serverside
processing pipeline has bypass those page/control related constructing ,
viewstate mapping, event mapping. steps. So we can not access those
features in script call back.

And for the below you mentioned:

=====================
Please elaborate on "executing the command separately". Note that the goal
is to get updated data FROM the form rather than sending updated data TO
the
form.
=====================

Yes, what I means is update date through code and then use the result to
modify the FormView's clientside view. I'm afraid we 're not able to
access the FormView or any other controls in script callback (like what we
do in normal postback).

Thanks,

Steven Cheng
Microsoft Online Support

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


--------------------
| Thread-Topic: ObjectDataSource update using callback instead of postback
| thread-index: AcXpPP/FQwZX2qfPRHqo/AByqVztqA==
| X-WBNR-Posting-Host: 209.137.235.2
| From: "=?Utf-8?B?SmltIEhhbW1vbmQ=?=" <Ji**************@nospam.nospam>
| References: <6E**********************************@microsoft.co m>
<hf**************@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: ObjectDataSource update using callback instead of postback
| Date: Mon, 14 Nov 2005 09:01:04 -0800
| Lines: 96
| Message-ID: <14**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:357996
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Is it possible to update the viewstate on the server from the client for
just
| the one formview control - ideally without doing a postback? Is it
possible
| to update the entire viewstate on the server from the client without
doing a
| postback?
|
| Please elaborate on "executing the command separately". Note that the
goal
| is to get updated data FROM the form rather than sending updated data TO
the
| form.
|
| Thanks,
|
| Jim
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Jim,
| >
| > As for ASP.NET script callback, its request (call back to
serversdie...) is
| > different from our normal post back request. For performance
consideration,
| > some of the normal processing in the server request have been bypassed
in
| > scrpit call back. Such as the Control Tree constructing and populating
and
| > some normal postback data processing and events other than the script
call
| > back. So we don't recommend that our serverside script call back
function
| > will have any code logic which rely on the page's control model. Is
you'd
| > like to do data updating, it is recommended, that we use Sqlconnection
and
| > SqlComand and executing the command separately and return the executing
| > result to clientside whicn will be better.
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| > --------------------
| > | Thread-Topic: ObjectDataSource update using callback instead of
postback
| > | thread-index: AcXnHkNwxKAJxANARKu4/LaAlXQNYA==
| > | X-WBNR-Posting-Host: 209.137.235.2
| > | From: "=?Utf-8?B?SmltIEhhbW1vbmQ=?=" <Ji**************@nospam.nospam>
| > | Subject: ObjectDataSource update using callback instead of postback
| > | Date: Fri, 11 Nov 2005 16:16:01 -0800
| > | Lines: 24
| > | Message-ID: <6E**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:357527
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | It would be udeful to be able to get the current on-screen values
from a
| > | FormView that is databound to an ObjectDataSource by using a callback
| > instead
| > | of a postback. For example:
| > |
| > | public void RaiseCallbackEvent(string eventArgs)
| > | {
| > | // update the data object with the values currently on screen
| > | FormView1.UpdateItem(true);
| > | }
| > |
| > | In an ordinary postback, such as a button click handler, calling
| > UpdateItem
| > | would force a call to the following business class update method, and
the
| > obj
| > | parameter would contain the values currently on screen:
| > |
| > | public static void Update(MyBusinessClass obj)
| > | {
| > | // validate, store, etc. here
| > | }
| > |
| > | However, if I call UpdateItem in RaiseCallbackEvent, then the obj
| > parameter
| > | in the business class update method will not have been updated with
the
| > | values the user has just typed in the form.
| > |
| > | Jim
| > |
| >
| >
|

Nov 19 '05 #5

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

Similar topics

0
by: msnews.microsoft.com | last post by:
I've got a paging and sorting enabled GridView whose datasource is and AccessDataSource. I build the SelectCommand at PageLoad - it's a union query to show items and comments of the user logged...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
4
by: Anne Catterick | last post by:
Hi, I have an british ASP.Net 2.0 application which is doing what (should) be very simple. But I am having issues. On my page I have a GridView as follows (some tags excluded for easy...
3
by: mthomason | last post by:
I keep getting this error when trying to update records using an ObjectDataSource. I have seen others post similar errors...but I haven't found any solutions. ObjectDataSource...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
0
by: Angel | last post by:
I created a Dataset Type on one project which generates a DLL. I have a web project . I created a webpage with a gridview. I attached an ObjectDatasource to the Dataset type from my other project....
3
by: KaOne | last post by:
Hi All, excuse me in advance for my not very perfect english. I need some help about a problem with a FormView bounded to an ObjectDataSource. In practise I have an ObjectDataSource that uses some...
4
by: tim.cavins | last post by:
I have a GridView populated by an ObjectDataSource. I am having issues passing the parameters to the objectdatasource. I have verified that the method is being called but none of the parameters...
1
by: John Kotuby | last post by:
Hi guys, I have finally added the AJAX extensions to my ASP.NET project in VS 2005 and VB. It was far simpler than I had anticipated, and I wondering why I didn't use the Update Panel sooner. ...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.