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

RadAjaxManager and the aspx page not called...

2 Answers 69 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Marco Miccini
Top achievements
Rank 1
Marco Miccini asked on 09 Jan 2010, 11:50 AM
I've a DIV control with an HtmlImage control inside dinamically generated by setting the src to a  an aspx page producing a Bitmap as

Response.OutputStream

.
Each time I press the btnVisualizza_MG button the image must be updated. The button is enclosed in a RadAjaxManager as triggering control of the div. This is a brief extract of the code.

 

<

 

telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">

 

 

 

 

 

    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnVisualizza_MG">

 

 

 

 

            <

 

UpdatedControls>

 

 

 

 

 

                <telerik:AjaxUpdatedControl ControlID="divDisegnoModificaDisegno" LoadingPanelID="lp1" />  

 

 

            </UpdatedControls>

 

 

 

 

 

        </telerik:AjaxSetting>

 

 

 

    <AjaxSettings>
</telerik:RadAjaxManagerProxy >

protected

 

void btnVisualizza_MG_Click(object sender, EventArgs e)

 

{

    divDisegnoModificaDisegno.Controls.Clear();

    System.Web.UI.HtmlControls.

HtmlImage image = new System.Web.UI.HtmlControls.HtmlImage();

 

    image.Src =

"DrawGeometriaSistema.aspx?dim_x=640&dim_y=609";

 

    divDisegnoModificaDisegno.Controls.Add(image);

}

THE PROBLEM: the first time I press the btnVisualizza_MG button, the DrawGeometriaSistema.aspx page is called and the image is generated but the following times the image remains unchanged since the code, when reaching "image.Scr=..." instruction, does not call the DrawGeometriaSistema.aspx page.

Why and how to solve this problem? 

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 13 Jan 2010, 03:53 PM
Hi Marco,

Could you please confirm that the problematic page works as expected with ajax disable or if you ajaxify it with ASP:UpdatePanel instead of RadAjax?
Additionally, it would be greate if you can send us a sample project illustrating the described issue for further debugging and investigation.

Check it out and let me know how it goes.
Greetings,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Marco Miccini
Top achievements
Rank 1
answered on 13 Jan 2010, 06:36 PM
Dear Iana,
I've resolved creating a different image.scr each time the page is called by using in the url a fictious parameter containing a randon number.
i.e. image.Src="DrawGeometriaSistema.aspx?dim_x=640&dim_y=609&unused_par="+rnd.Next();
In this way the scr string is different each time is called and ... it works!
Tags
Ajax
Asked by
Marco Miccini
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Marco Miccini
Top achievements
Rank 1
Share this question
or