Showing posts with label didnt. Show all posts
Showing posts with label didnt. Show all posts

Wednesday, March 28, 2012

ajax based masterpage

can any1 tell:

ajax based masterpage template i found in vs 2k8 but didn't get its purpose

i redirect from 1 page to another page of my site but don't wanna rerender/refresh contents of master page. i think this thing can do this but how not sure as i tried but it postback :) may b m wrong or doing wrong

Any time you go to a new page, even a page that has the same master as the current page you're on, you are going to have a full page refresh. Only partial page updates on the same page can be "hidden".

Saturday, March 24, 2012

Ajax and ResponseRedirect

Please, does anyone knows where is the problem ?

I′m new with ajax and I lost many hours making searching and testing , but i didn′t find an answer.

The problem is :

I have a webform with one textbox and one button (just to make tests)

in the code I have

try

{

Produto m = new Produto();

m.idProduto = textbox1.Text; //in this case I will force a primary key error

newGenericDAO().salva(m); // saving the object

}

catch (Exception problema)

{

Session.Add("msgErro", problema.Message);

Response.Redirect("~/frmErro.aspx");

}

And I redirect the program to a webform error, everything all right until here, but when i go back the textbox.text is empty ??

Why i′m losting the textbox value ? with AJAX it′s necessary to save the objects of webform in the session before use redirect ?

if I make other solution without AJAX works welll

Please, if anyone knows the answer............

thanks, Valmir

Hi vmorikawa,

I think you are using Update Panel...

There is a problem with Response.Redirect when you use Update Panel.

Try using Server.Transfer

Cheers,

Radiant


Hi Radiant , thank you very much for your help. Yes I′m using UpdatePanel and I try to change Response.Redirect to Server.Transfer and now I have the message:

--------
Windows Internet Explorer
--------
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

Any Idea ??


Response.Redirect is allowed in UpdatePanel not the Server.Transfer. Regarding the texbox gets empty, i suggest that you check the other parts of your page and ensure that it does not explicity set the textbox content to empty.

Wednesday, March 21, 2012

AJAX and Calendars

OK - I really like the AJAX Calendar extender but it's not quite what I need.

I would love to have a Calendar control that didn't have to postback every time you changed dates. I need to have the user select a date range and then that date range (day, week, or month) is used to populate a datagrid. Is this possible with the tools available currently?

Thanks,

Matt

Hi Matt,

As far as I know, there will not be a auto postback upon the selection of calendar.

Please refer to this demo:

http://ajax.asp.net/ajaxtoolkit/Calendar/Calendar.aspx