This is a migrated thread and some comments may be shown as answers.

[Solved] Force Postback

2 Answers 390 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Shane
Top achievements
Rank 1
Shane asked on 08 Oct 2007, 06:09 AM
Hi Guys

I have a user control inside an radajaxpanel. In that user control I have a button which I need to force to do a postback rather than ajax. I don't want to use postbackurl. Please advise me guys!

Cheers
Shane

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Oct 2007, 07:31 AM
Hi Shane,

You can use similar to this example approach:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Ajax/Examples/Manager/PartialPostBacks/DefaultCS.aspx

Best wishes,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Shane
Top achievements
Rank 1
answered on 09 Oct 2007, 12:29 AM
Hi Vlad

Thanks for that!

I have tried that, and it works. However it is throwing a Javascript error.

In my parent page I have a property, so the user control can access the Ajax panel

Public ReadOnly Property RadAjax() As Telerik.Web.UI.RadAjaxPanel 
        Get 
            Return rap 
        End Get 
    End Property 
 

Then in the user control in the page load event

Dim pPage As Products = CType(Page, Products) 
        btnBack.OnClientClick = String.Format("{0}.__doPostBack(""{1}"",""{2}"");", pPage.RadAjax.ClientID, btnBack.UniqueID, btnBack.CommandArgument) 
        btnNext.OnClientClick = String.Format("{0}.__doPostBack(""{1}"",""{2}"");", pPage.RadAjax.ClientID, btnNext.UniqueID, btnNext.CommandArgument) 
 

When I click on the button I am getting

Sys is not defined 
_onReadyStateChange()ScriptResource.ax... (line 4009) 
[Break on this error] _this._webRequest.completed(Sys.EventArgs.Empty); 

Cheers
Shane
Tags
Ajax
Asked by
Shane
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Shane
Top achievements
Rank 1
Share this question
or