ASP.Net asyncfileupload control in JQueryUI modal dialog - asp.net

We are in the final stages of moving an older web application from the asp.net 2.0 environment to asp.net 4.0. We've got everything ironed out but a file upload implementation.
We use an asyncfileupload control within a JQueryUI modal dialog...which runs well under 2.0 but not under 4.0, the control simply does not fire the UploadedComplete server-side event.
Our testing indicates the same code will run outside of the JQueryUI dialog, but not when in the dialog...so we assume the issue relates to JQueryUI under 4.0.
Seen one or two very old posts suggesting JQuery moves the upload control outside the form element, and thus the control doesn't fire, but that doesn't answer the question as to why our original implementation runs under 2.0 but not 4.0.
Any guidance would be appreciated.

Have you tried setting the right enctype="multipart/form-data" .
Hope these links already answered ,gives you some help
StackOverFlow,
ASPNet-Button-do-PostBack-in-jQuery-Modal-Dialog-Popup

Related

AJAXControlToolKit Partial postback not working

I thought including ajax control toolkit is a simple thing, but for some odd reason it's not working. It always triggers a full postback from a button inside UpdatePanel.
I am using VS 2015 / asp.net 4.6.1 / Class Library output type. ajaxcontroltoolkit.dll v18.1.1 is added via Nuget. I created a very basic web form page with only an update panel and a label outside of it. Clicking on a button inside update panel always causes a full post, updating the label outside along with it.
Oddly enough, I created a blank Web Site project with the same page and code behind, and it works fine as expected there.
I use browser debugging tool to observe the network output. The site that works appears to have 1 reference to WebResource.axd and 2 references to ScriptResource.axd. Versus the site that doesn't work having only 1 reference to Scriptresource.axd and none to WebResource.axd.
Is there something I missed? Any further techniques I can use to troubleshoot the problem?
One full day of trouble shooting. This setting in web.config prevents ajax control toolkit from performing partial page load.
https://weblogs.asp.net/scottgu/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax

DotNetNuke 7 - Edit page menu not working when adding ajax control to module

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.

Disable javascript in GridViews

Is there a way prevent an ASP gridview from always relying on javascript for the edit and delete LinkButtons? If I disable javascript in my browser the edit and delete commands still seem to link to "javascript: _doPostBack". (I'm using VB and .NET framework 2.0)
Thanks in advance.
You could implement the edit and delete buttons yourself using an <asp:TemplateField>. Then you are free to have them do the postback however you like, with <input type=submit> buttons, perhaps.
You are limited to smaller subset of controls when Javascript is not available. See MSDN. The postbacks function conveys to the runtime what was clicked and that is how the server side events are triggered. If you really want to develop an app without Javascript support, you will have to stay away from most server controls. The rendering is fine but any interaction (like editable grid) would be one of those controls to stay away from. You might also want to look into ASP.NET MVC framework.

asp.net 4.0 Random posting behavior

At work, we are developing a complex webForms app. We are using Visual Studio 2010 to develop a framework 4.0 site in C# 4.0.
We have been experiencing random behavior on post. Here is what we have seen:
<Button> tag with a runat server and a ServerClick event will SOMETIMES run the Click event twice (Average 80% twice) - Converted to asp:Button control and it always fired its click event once. So, we called that 'fixed'.
<asp:DropdownList> control with autopostback=true. We are seeing similar behavior. We have two UserControls that have an <asp:DropdownList> with autopostback=true inside. When two of these UserControls are displayed at the same time, If you click one of them, it calls the OnChange event for both DropdownLists. (Average 40% both called)
We have determined that this is not a client side issue. Fiddler 2 shows that we are filling the EventTarget correctly and that both of the DropdownLists' values are correct on post.
At a guess, it seems that the __DoPostBack "part" of asp.net 4.0 has an issue since that is the only thing that these two similar issues shared. Has anyone else seen issues like these and are their any tips/tricks to solve this?
(BTW, converting to a older version is not an option. We are heavily using some of the new features in 4.0)

Modal MessageBox for ASP.NET without jQuery

I have an assembly with custom ASP.NET server controls that is used in several, mostly in-house, ASP.NET 2.0 applications. The server controls use simple modal popup messageboxes, which are currently implemented using the javascript alert and confirm functions.
I want to release a new version of this assembly that uses a better solution for messageboxes, including support for Yes/No buttons.
Ideally the appearance would be something like a simplified version of the Ajax Control Toolkit ModalPopup extender (sample here).
My constraints are that this should be as easy as possible to integrate into existing ASP.NET 2.0 applications without introducing new dependencies: ideally just drop in a new version of the assembly, that contains all the javascript it needs as an embedded resource, and possibly a CSS file.
Because of this constraint, I am not considering solutions I've seen that use jquery, or the ASP.NET Ajax Control Toolkit, which appears to require adding elements to pages that use the extenders (ScriptManagers and the like).
Any recommendations?
This might help..a javascript example: How to code a JavaScript modal popup (to replace Ajax)?

Resources