Sunday, May 19, 2024
Homepage · c#
 Popular · Latest · Hot · Upcoming
63
rated 0 times [  68] [ 5]  / answers: 1 / hits: 17098  / 11 Years ago, thu, november 21, 2013, 12:00:00

I have a div that is shown as a Modal dialog.



<div id=div2 style=display: none; title=Upload Prenda>
<center>
<br />
Select File to Upload:
<asp:FileUpload ID=PrendaFileUpload runat=server Width=345px />
<asp:RequiredFieldValidator ID=RequiredFieldValidator1 runat=server ControlToValidate=PrendaFileUpload
ErrorMessage=File to be uploaded Required ValidationGroup=X>*</asp:RequiredFieldValidator><br />
<asp:ValidationSummary ID=ValidationSummary1 runat=server ShowMessageBox=True
ShowSummary=False ValidationGroup=X />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<asp:Button ID=uploadButton runat=server Text=Upload OnClick=uploadButton_Click
Width=100px />
</center>
</div>


here is the jquery for it



 <script type=text/javascript>
$(function() {
$( #div2 ).dialog({
autoOpen: false,
modal:true,
resizable: false,
height: 200,
width: 600
});
$( #toggle ).click(function() {
$( #div2 ).dialog( open );
});
});
</script>


the problem is after i press the button to activate the OnClick=uploadButton_Click the method inside does not fire, any fix for this? sorry im just new in using jquery.


More From » c#

 Answers
9

Well this is the answer that worked for me, im not using any update panel and this is what i used



adding this to the dialog declaration:



  open: function(type,data) {
$(this).parent().appendTo(form);
}


found the answer in here so if you want to know more about click the link beside :)


[#74149] Wednesday, November 20, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
harleyterryp

Total Points: 290
Total Questions: 92
Total Answers: 95

Location: Montenegro
Member since Sun, May 7, 2023
1 Year ago
;