asp.net Tabs style lost and tabs are not generated - css

My asp.net web app uses AjaxControlToolkit 3.5, I use TabContainer and there are 4 tabs in it.
For unknown reason the four tabs won't show up as tabs, although their tab's caption are there, and clicking on each caption will take me to the "tab"
What's the possible reason that the tabs fail to show up? css style file lost? or AjaxControlToolkit failed?
Thank you. Any clue is appreciated.

I believe AjaxControlToolkit is causing the issue

I had a similar issue to this where I could switch between tabs and there was no content on them. The root of the problem ended up being missing closing tags in the ContentTemplate of one of the TabPanels. Inspect your html very closely inside of the ContentTemplate to ensure the html is valid and all tags are properly closed.

Related

DataPager with <a> on current page number instead of Label

I have a DataPager working fine except for one thing: the current page number is rendered with a Label and I need it to be as innertext for an <a> tag.
Is there a way to do this?
One way would be to subclass DataPager and override Render.
EDIT: Better yet, use a WebControlAdapter.
Customizes rendering for the Web control to which the control adapter
is attached, to modify the default markup or behavior for specific
browsers.
EDIT: Also please see ASP.NET: Can I somehow change the HTML rendered by NumericPagerField?.

How to use jQuery scripts with MasterPage/Content page scenario?

I have created a great stand-alone web form in asp.net utilizing many jQuery features and CSS. It works fine. When I re-create it as a web content form as part of a MasterPage, my jQuery and javascript is completely ignored.
I am referencing the pertinent jQuery and CSS in my of the MasterPage. I have a content placeholder at the bottom of the masterpage called "ScriptContent". In my content page, this is where I plug in the various jQuery methods and javascript.
When I view the page source everything is there. However, it's all being ignored so to speak. What am I doing wrong?
Probably the issue is that when your page is loaded as a content page within a masterpage, the ids of all of the elements are altered to reflect what content page they are in. Thus the ids you are using in jquery won't work.
Options I can think of include:
setting the ids used by jquery programatically from asp.net code (using the clientId of the element)
having your jquery selectors reference some other attribute of your element, such as class (which is unfortunately a bit slower)
I would match the source output of the working version against the output of the non-working version.
Obviously, there's something being rendered out from ASP.NET differently. Getting the difference would tell you what.
Since I have no details, I can only guess...but it sounds like you may have left out some $(document).ready() type functionality to kick off your script somewhere.

ComponentArt grid; javaScript; Aspx MasterPage

I have a ComponentArt grid that I'm editing with a pop editing dialog. I pass values between the grid and the dialog using javascript. All was well until I put the page containing the grid inside a MasterPage; I got some errors because of naming containers and fixed them, but it looks like ComponentArt's DataGrid is still looking for something it can't find, because it's blowing up in their javascript.
Question: Has anyone had a ComponentArt DataGrid blow up inside a master page before, and if so, what did you do about it?
Known issue with ComponentArt Grids inside other controls, having to do with the dialog animation. ComponentArt representative:
This sounds like a known bug with the
dialog (D6098 in our system)- the live
animation type can error if the
control is within a control (say, a
user control, or in your case a
content control). Until the bug is
resolved you'll need to change the
animation type. I'm very sorry for the
trouble.
Here's the forum post.
Meanwhile, it looks like changing the animation is the only fix.

UpdatePanel in repeater overwrites controls underneath it

I have a Repeater with an ASP.NET AJAX 1.0 UpdatePanel inside it. There are buttons outside of the UpdatePanel but still in the repeater. When a section inside the UpdatePanel appears (it's a hidden Panel control that appears when user answers a question a certain way), the buttons at the bottom disappear.
Here is an illustration.
[REPEATER]
[UPDATEPANEL]
[QUESTION] <-- when user says yes, Panel appears
[PANEL]
[/UPDATEPANEL]
[TABLE] <-- This table is no longer visible.
[Button]
[/TABLE]
[/REPEATER]
If I move the table to the top of the page, the content does not disappear, so I suspect it is a style issue, where the controls are actually there, but are underneath the content of the UpdatePanel. I've tried adding a <br clear="all"/> to just before the table, to no avail.
Any idea how I might fix this?
Edit: I had an errant missing closing tag that caused the UpdatePanel to extend further than it should've, so it was hiding my control. Using the Firefox plugins helped identify this.
My suggestion is to use Firefox and the Web Developer toolbar to do a View Generated Source after the update has occurred or inspect the elements with Firebug. If the table html is still on the page, then it could be either a style issue or an issue with malformed HTML in the panel causing the table not to render properly. If the table html is missing, then it is being removed from the DOM (or overwritten) by the AJAX callback. You might be able to use Firebug to debug the actual AJAX callback as well to see what and when things are actually being replaced.
Posting the generated HTML before and after the update in your question would also be helpful if you still can't figure things out and want more input.
Put the table inside the updatepanel, or put the whole repeater in one updatepanel.
Note that the Clear attribute is Deprecated as of HTML 4.01, and isn't included in XHTML Strict - what document type are you using - if you're using strict (and you're clearly using XHTML of some kind, because you've closed your br), then your browser has every right to ignore the clear attribute.
You would be better off doing this with CSS:
<style type="text/css">
.cleaner{
clear: both;
}
</style>
<br class="cleaner" />
Also, you could try putting the br after the panel, so that it comes back in the UpdatePanel and forces the browser to honour it.

AJAX Dropdown Extender Question

Ok, so I got my extender working on a default.aspx page on my website and it looks good. I basically copied and pasted the code for it into a user control control.ascx page. When I do this I completely loose the functionality (just shows the target control label and no dropdown, even upon hover). Is there any reason why it doesn't work in a custom user control inside a masterpage setup?
Edit:
Didn't quite do the trick. Any other suggestions?
Its in a master page setup, using eo web tabs (I tried it inside the tabs and outside the tabs but on the same page as the tabs, to no avail), and its in a custom user control. Think there are dependency issues?
Apparently EO has compatibility issues with MS Ajax Control Toolkit. http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=1319
I guess I'll leave this question open to see if anyone figures out some sort of workaround.
After a few days of looking I found a call to a modal popup extender .show() in the code behind. After commenting it out everything worked fine.
I don't know if this helps, but I had the same problem with the autocomplete extender and determined that the server-side function could not be in the user control, but needed to be on the page (or in a webservice, I guess). Once I moved the function, it worked fine.
Check the DocType. Here is what I have found useful
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >
Place this in your user control (or the page that uses it) and all should be well. I had a similar problem with a collapsible extender and this worked for me.
Edit: Here is a link to my question for further details.
Hmm all that functionality on the loose! careful you don't lose it (sorry!)
Are you using something like Firebug (firefox plug-in) so you can see what ajax calls the page is trying to make? If it is making the call but the server is behaving oddly then you will see the error there too. IE users maybe able to use dev toolbar.

Resources