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.
Related
I am creating a simple DotNetNuke module and every time I add a control that contains ajax it somehow interferes with the edit page menu. The control in question is one from Syncfusion and it is the numeric textbox.
The page and the menu functionality works well as long as I use the standard Microsoft user controls. For example if I change the ajax numeric textbox for the asp.net or the html one then it works well. As soon as I add the ajax textbox then the edit page menu does not work.
Has anyone else experienced this issue?
Additional information: The Syncfusion control does not require any specific jQuery version.
There is no error logged on the DNN event viewer. I have been trying with FireBug to follow the tracks but it reveals nothing.
I have attached the screenshot to help visualize the issue.
This happens because of jQuery conflicts. The syncfusion controls load their own jQuery library. To avoid issues within your module add a key to the appSettings section of the DNN web config file:
"SFjQueryLoad" value="false"
This will cause the control to use only the jQuery library provided by your DNN website.
I having an issue with the ASP.NET Treeview control. I create the treeview just fine but the nodes will not expand or collapse. I see there is a javascript error but it is for line 1 character 0 of the webpage, there is nothing at line 1 character 0.
I am using the ASP:Treeview control in conjunction with the Telerik controls, but I'm not sure if that is an issue.
I saw there was a similar question here but the answer is not pertinent to my site. Has anyone run into this issue before? I've tried searching Google and tried a number of proposed solutions but so far none have worked.
Thank you,
Normally with problems like this it is best to isolate the code which is causing the problem. For example, create a minimal page with no other controls or external JavaScript and see if the problem persists.
It's also useful to use a decent debugger. The latest IE8 actually has a very good Visual Studio-style JavaScript debugger built in - go to your page, hit F12 and the go to the Script tab and click 'Start Debugging' and see where that leads you.
I've seen unhelpful javascript errors when a page does an AJAX postback, an exception occurs on the server, and the client javascript is unable to handle what the server returns. You could ascertain if this is happening by debugging the site, putting a breakpoint on the Page_Load method (or something similar), and see if it gets hit when trying to collapse or expand the TreeView.
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.
I'm using a ReportViewer control which often runs into problems with the javascript associated with UpdatePanels in ASP.NET. I've created a second page which is very simple, no Update Panels. What's the best way to link the two pages? An iframe sounds bad. However, having to run a report, then be returned a link to the results also sounds bad. Sending the user to the simple display won't work in this case. Any suggestions, am I seeing things wrong here?
What I would do is rewrite the page that uses an update panel such that it uses straight javascript web method calls. This would remove the need for the reportviewer control to be on a seperate page because you would no longer need an update panel.
I have a problem that is really making me feel dumb. I have a custom control that inherits textbox. This textbox (at least for this example) simply has a .js file that is embedded in the .dll.
Long story short, works great when not in an AJAX update panel. So i did some research and found that instead of using: Page.ClientScript.RegisterClientScriptResource, i should use ScriptManger.RegisterClientScriptResource - i have done this in the overrdive render method, but the javascript still does not fire.
Anyone know what im doing wrong?
example:
i have a folder in my project called Scripts - it contains myscript.js
My Assembly is called Jim.Bob.Controls
I add attributes to my controls ie: Attributes.Add("onclick", "Test2();");
In the Override Render:
ScriptManager.RegisterClientScriptResource(this.Page, typeof(CustomTextBox), "Jim.Bob.Controls.Scripts.myscript.js");
Yet i still get 'object expected' error.
I need my textbox to work with and w/o AJAX. I imported System.Web.Extensions into my project to access ScriptManger
Can someone please tell me what im doing wrong? Again, this whole thing worked fine w/o AJAX, i have put the necessary stuff into the AssemblyInfo.cs (WebResource:,,,,etc)
Thanks in advance :-)
--- UPDATE ---
I reverted the control, trying it in a non AJAX web and i am having the same problem. Not sure why i have a problem, i have another custom control in the same assembly that is working just fine - have them setup the exact same way, only difference is the one that is working inherits WebControl, the one that is not inherits TextBox
...
in the one that is working i emmit html like Go and do it
Where the one that is NOT working i have
Attributes.Add("onclick", "CustomFunction();");
Also, if i do Attributes.Add("onclick", "alert('hello');");
it works fine.
Sorry for such a long post.
Try to pass this instead of this.Page. The ScriptManager would output scripts only for controls which are being updated (children of UpdatePanel that is).
I've just noticed that you are doing this during Render. That's too late. Try PreRender instead.