Showing posts with label refresh. Show all posts
Showing posts with label refresh. Show all posts

Wednesday, March 28, 2012

asp.net ajax refresh the UpdatePanel every 30 sec?

I am currently using Timer control inside my update panel to update automatically every 30 sec. However i wanted to use json to do the same thing.

Any suggestions?

Thanks

Hi,

JSON (JavaScript Object Notation) is a lightweight data-interchange format, or it can be viewed as a protocal defining how object is serialized when transporting.

It can't be used to perform actions at a certain interval like Timer.

Please refer to this for more information:http://msdn2.microsoft.com/en-us/library/bb299886.aspx

Hope this helps.

Wednesday, March 21, 2012

asp 2.0 Login control and Ajax RC1

Hi to all,

I'm new to ASP & AJAX, but I would like to use Ajax in a Login control, so the page wouldn't refresh for everytime a user log in.

Somehow, even with a very simple code, i can't get this to work. Any idea why this is happening ??

I'm also using a SQL Connection, if needed i'll post here the web.config file

Any help will be greatly apreciated. Thanks

Here goes the code, it can't get any simpler than this ... i guess

<formid="form1"runat="server"><asp:ScriptManagerID="ScriptManager1"runat="server"/><asp:UpdatePanelID="UpdatePanel1"runat="server"><ContentTemplate><asp:LoginID="Login1"runat="server"BackColor="#F7F7DE"BorderColor="#CCCC99"BorderStyle="Solid"BorderWidth="1px"Font-Names="Verdana"Font-Size="10pt"><TitleTextStyleBackColor="#6B696B"Font-Bold="True"ForeColor="#FFFFFF"/></asp:Login></ContentTemplate></asp:UpdatePanel></form>

I don't use <asp:Login,

but try add: EnablePartialRendering="true" to your scriptmanager and UpdateMode="Conditional" to your UpdatePanel.

Hope it works.


Hi,

Unfurtunatly no, everything remains the same, but thanks for your help.

Regards,

Argh! Tabs disappear

Using the AJAX 1.0 release, I create a page with two tabs on it. The page displays great and a 'refresh' leaves the page untouched. However, if I click the submit button on the page, my two tabs disappear and I get the following javascript error:

Line: 218

Char: 9

Error: 'this.get_element().style' is null or not an object

Code: 0

URL:http://localhost/test/SetPassword.aspx

Any idea what might be causing this?

Thanks.

As I've worked with this, I've found that the error only occurs if the tabs are inside an update panel.


Yes this is a known issue - see this thread for discussion/fix:

http://forums.asp.net/thread/1549317.aspx