Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Wednesday, March 28, 2012

Updated to IE7 and have some formating error.

I had Ajax enabled website working with IE6 perfectly as soon as I updated my IE to IE7 I have problem with my formatting. All the data grids labels and text (controls) are all around. Panels are not working the same as before.

Any idea?

It's probably having to do with the fact that IE6 was horrible in terms of following the standards. If you look at your site in Firefox or Opera, it probably will look the same as in IE7. Without code, it's hard to pinpoint the problem, but you should invest some time in the various CSS sites like alistapart and csszengarden to start debugging. Also, install IE Developer Toolbar so that you can see where your objects are in the browser's view and what styles they are responding to at runtime.

Monday, March 26, 2012

UpdatePanel (and other Ajax) not working inside of a frame

Hi,

I'm working on a project that uses a frame for the navigation and then a larger window for the actual content. Most of the site is built with classic ASP - which I know very little of - and we're working towards converting it piece by piece to .NET. I built up a page with several UpdatePanels and at least one UpdateProgress controls on it. Everything works absolutely perfectly until I try to bring it into the frameset used by this site. I thought maybe it was just being inside a frame that it didn't like so I made a simple prototype inside a frame from scratch and ran it outside of our site frame (the top navigation frame was just pointed to google.com and the content frame was what I was testing) and that worked just fine.

I guess the end result of all that is that there's something somewhere in the old ASP section of the site preventing me from using any Ajax on the site. Being so unfamiliar with ASP, I'm not even really sure where to begin troubleshooting something like that.

Any ideas or suggestions would be greatly appreciated. Thanks!

one thing to note is that using frames is becoming an old obsolete practise and if you are moving to .net I would recomend switching to masterpages to handle navigation and such


I believe that's in the plans at some point. I inherited this site and the frames with it so for the moment, there's nothing I can do about it, unfortunately. I definitely would prefer to go the master page route.

UpdatePanel -> window.close

Good morning @dotnet.itags.org. all

I am working on a ModalDialog window, there i have UpdatePanel over the whole modalDialog, Inside of it several atlas/ajax components.
Inside on top i have a Button to save the Datasheet/ Data fields. On other modals before i did it like so:

btnSave_Onlick -> save data to SQL and after it (last command) Response.Write ....window.close / PageStartupScript...window.close...
It worked fine in the past, but now the button is inside of the updatepanel and it throws out a Error with the response.write method,
and if i use StartupScript it just dont close the window. Is there any method to do this events inside of an updatePanel event?

Thanks for reponses
Marc

Specifially - Response.Write commands kill the whole microsoft.ajax enviroment - specifically with the new BETA. (I learned the hard way unknowningly)...

The alterantive is to just use a label or textarea (html) and assign values to after doing whatever you need to display after whatever processing. Little confused though are you talking window close as in IFRAME or modalpopup.show() hide()? Your post seems to indicate you are using an iframe and not a modal...

None the less if modal - then wrap the form or whatever you present in the modal in a panel and on successful submit make it not visible and assign a lable or generichtmlcontrol and display whatever message you want in it with a close button ...


hello.

if you're trying to insert javascript statements from a partial postback then use the new registerXXX static methods of the scriptmanager class.


Ok Thanks Luis i will remind it for further things :D
After all, for this i just brought my button outside of the panel...wasnt that big problem.

Saturday, March 24, 2012

UpdatePanel and control state

Greetings,

I am currently working on my place of employments first .NET 2.0 enterprise app, and we are toying with the idea of implementing Atlas. From my first run through, it seems quite powerful, but I have either found a limitation or a problem that I hoped I could receive guidance on.

I have an update panel that contains nothing more than a label inside. Upon clicking a linkbutton, I display a ModalPopUp, with two server side buttons. Upon clicking the OK button, I am making a trip to my code behind, and populating the label with the text "OK". Herein lies the issue.

If I enable partial rendering and refresh the screen, voila, the label is now empty. If partial rendering is disabled and I refresh the screen, the control maintains state as it was a classic styled postback.

Any guidance on how I can keep the state of my controls using partial rendering, as this page I am working on will contain numerous post backs similar to this, and can't rely on the fact that a user will not ever refresh the page, thus losing everything?

All in all though, Atlas looks pretty cool.

Thanks,
Ryan

hello.

can you show us a very simple page that reproduces this issue?

UpdatePanel and FileUpload control revisited one more time

I've seen nothing but real janky solutions to the problem at hand. That problem being that fileupload doesnt appear to be working on an update panel.

I've done a signifigant ammount of research and understand WHY it occurs, but not if theres any real way to circumvent the problem. I was wondering if anyone has been able to make a signifigant difference where fileupload could occur and not initiate a full postback.

I am using july ctp.

Anything that can be done?

I ran into exact problem. Only solution, by my opinion is to use client button control, and manage fileupload with javascript. Unfortunatelly I don't know javascript nor I have time to learn it :(
What is the problem putting a (invisible) button outside the update- panel and the upload- button inside the panel. Then you add a new eventhandler to the outside- button and process the things you want to there (save the file, show the file, redirect, ...).

The last thing you have to do is to trigger the outside- button event if the inner button is clicked. you just have to add a onclick- attribute: InnerButton.Attributes.Add("onclick", Page.ClientScript.GetPostbackEventReference(OutsideButton, ""))

ollifant

Nice, but there are still few problems:

- fileUpload control has its property "hasFile" set to'true' only if second time fire button click event (first time nothing happened)

- page still refreshs whole content even if i add button to trigger collection of update panel

forgive me my poor english


FileUpload controls when they are used to upload files as part of an asynchronous postback.

See for more details..

http://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx