顯示具有 ScriptManager 標籤的文章。 顯示所有文章
顯示具有 ScriptManager 標籤的文章。 顯示所有文章

2014年7月13日 星期日

[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Page content gone after postback


Hi to all 


I'm working on project where I created masterpage and put updatepanel in the masterpage all the related pages are missed the whole page contents after postback , when I remove the updatepanel from the masterpage , the content of pages not go.



Best Regards


AFZO 



First, open the developer tools for the browser using F12. Check the console tab to see if there are any scripting errors. It could very well be that during postback there is an error being thrown that is essentially ruining loading.


To be honest, an UpdatePanel in a masterpage is not normally done. There are way too many issues that can occur, they are difficult to debug, and too often you need to tailor the triggers for the specific updatepanel based on the form, which you cannot really
do if it's in the masterpage. It may sounds like a time-saving idea, but it's not done in practice. Normally the only releated piece that is put into the masterpage would be the scriptmanager to ensure it's available to all pages that would use an updatepanel.


[RESOLVED] Ajax Control CollapsiblePanelExtender Not working


Hi there,


I am trying to use a Ajax CollapsiblePanelExtender  in a web page but that dosent work. Am I  missing some thing ? Here is the code




















Header







   























































































































































 







 
 







 
 







 
 







 
 







 
 







 
 







 
 









 
 







 
 

 


 
 










    


























CollapseControlID="pnlheader" CollapsedImage="expand_blue.jpg" ExpandControlID="pnlheader" ExpandedImage="collapse_blue.jpg"


ImageControlID="imgToggle" SuppressPostBack="True" TargetControlID="pnlRegisterUser" CollapsedText="Show Details...." ExpandedText="Hide Details..." Collapsed="True">







Finally got it working by using ToolScript Manager instead of ScriptManager. But then the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?



Hi,




N1ZAM


Finally got it working by using ToolScript Manager instead of ScriptManager


It is always preferred to use AjaxToolScriptManager control when AJAX controls are being used.




N1ZAM


the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?


When CSS is applied to the CollapsiblePanelExtender, the inner div that is created also inherits the CSS class.  This causes issues when padding is a property of this style.


Solution: target the div created by the Collapsible Panel extender with the styles that you want


For more information:


SOLVED: CSS Padding Issue in CollapsiblePanelExtender


Hope it helps!


Best Regards!


[RESOLVED] Iframe in update panel not updating


Hi, I am facing this problem that after I upload a new pdf file the iframe in the ajax update panel does not get updated until I did a refresh manually.


I have did a simple dummy to show the error: 


.aspx:


 









Sec Sch Testimonial















.aspx.cs:


protected void UploadButton_Click(object sender, EventArgs e)

{

string admin_number = Label1.Text;

if (FileUpload.HasFile) //check for exist file

{

try

{

string ext = Path.GetExtension(FileUpload.FileName); //check for file extension

if (ext == ".pdf")

{

//string filename = Path.GetFileName(FileUpload.FileName);

FileUpload.SaveAs(Server.MapPath("~/pdf/") + admin_number + ".pdf"); //upload the file to the storage

}

}

catch (Exception ex)

{

}

}

//LinkButton1.Click();

UpdatePanel1.Update();

//refreshContent(admin_number);

//UpdatePanel1.Update();

//pdf_viewer.Attributes.Add("src", "images/testimonial/" + lblAdminNo.Text + ".pdf");


}

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

{

Label1.Text = DropDownList1.SelectedItem.Value.ToString();

UpdatePanel1.Update();

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

string file = Server.MapPath("~/pdf/" + Label1.Text + ".pdf");

if (System.IO.File.Exists(file))

{

pdf_viewer.Attributes.Add("src", "pdf/" + Label1.Text + ".pdf");

}

else

{

pdf_viewer.Attributes.Add("src", "http://www.google.com");

}

UpdatePanel1.Update();

}



Hi,


According to your description and the code you provided, you put the upload control into UpdatePanel, so far as I know, as you place FileUpload control in UpdatePanel and try to upload the file asynchronously using the
HasFile property of the FileUpload Control will always be false. So we will add
PostBackTrigger.


There is a demo, I have tested it ok, please refer to the code below:














<%----%>



The code behind:


 protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{

string fileName = FileUpload1.FileName;
FileUpload1.SaveAs("D://Images/" + fileName);
//img.ImageUrl = "~/Images/" + fileName;
Label1.Text = "ok";
}

}

protected void Button2_Click(object sender, EventArgs e)
{
string fileName = FileUpload1.FileName;
if (FileUpload1.HasFile)
{


FileUpload1.SaveAs("D://Images/" + fileName);
// img.ImageUrl = "~/Images/" + fileName;
}
Label1.Text = fileName;

}

Hope it's useful for you.


Best Regards,


Michelle Ge



[RESOLVED] Ajax Control CollapsiblePanelExtender Not working


Hi there,


I am trying to use a Ajax CollapsiblePanelExtender  in a web page but that dosent work. Am I  missing some thing ? Here is the code




















Header







   























































































































































 







 
 







 
 







 
 







 
 







 
 







 
 







 
 









 
 







 
 

 


 
 










    


























CollapseControlID="pnlheader" CollapsedImage="expand_blue.jpg" ExpandControlID="pnlheader" ExpandedImage="collapse_blue.jpg"


ImageControlID="imgToggle" SuppressPostBack="True" TargetControlID="pnlRegisterUser" CollapsedText="Show Details...." ExpandedText="Hide Details..." Collapsed="True">







Finally got it working by using ToolScript Manager instead of ScriptManager. But then the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?



Hi,




N1ZAM


Finally got it working by using ToolScript Manager instead of ScriptManager


It is always preferred to use AjaxToolScriptManager control when AJAX controls are being used.




N1ZAM


the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?


When CSS is applied to the CollapsiblePanelExtender, the inner div that is created also inherits the CSS class.  This causes issues when padding is a property of this style.


Solution: target the div created by the Collapsible Panel extender with the styles that you want


For more information:


SOLVED: CSS Padding Issue in CollapsiblePanelExtender


Hope it helps!


Best Regards!


[RESOLVED] Iframe in update panel not updating


Hi, I am facing this problem that after I upload a new pdf file the iframe in the ajax update panel does not get updated until I did a refresh manually.


I have did a simple dummy to show the error: 


.aspx:


 









Sec Sch Testimonial















.aspx.cs:


protected void UploadButton_Click(object sender, EventArgs e)

{

string admin_number = Label1.Text;

if (FileUpload.HasFile) //check for exist file

{

try

{

string ext = Path.GetExtension(FileUpload.FileName); //check for file extension

if (ext == ".pdf")

{

//string filename = Path.GetFileName(FileUpload.FileName);

FileUpload.SaveAs(Server.MapPath("~/pdf/") + admin_number + ".pdf"); //upload the file to the storage

}

}

catch (Exception ex)

{

}

}

//LinkButton1.Click();

UpdatePanel1.Update();

//refreshContent(admin_number);

//UpdatePanel1.Update();

//pdf_viewer.Attributes.Add("src", "images/testimonial/" + lblAdminNo.Text + ".pdf");


}

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

{

Label1.Text = DropDownList1.SelectedItem.Value.ToString();

UpdatePanel1.Update();

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

string file = Server.MapPath("~/pdf/" + Label1.Text + ".pdf");

if (System.IO.File.Exists(file))

{

pdf_viewer.Attributes.Add("src", "pdf/" + Label1.Text + ".pdf");

}

else

{

pdf_viewer.Attributes.Add("src", "http://www.google.com");

}

UpdatePanel1.Update();

}



Hi,


According to your description and the code you provided, you put the upload control into UpdatePanel, so far as I know, as you place FileUpload control in UpdatePanel and try to upload the file asynchronously using the
HasFile property of the FileUpload Control will always be false. So we will add
PostBackTrigger.


There is a demo, I have tested it ok, please refer to the code below:














<%----%>



The code behind:


 protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{

string fileName = FileUpload1.FileName;
FileUpload1.SaveAs("D://Images/" + fileName);
//img.ImageUrl = "~/Images/" + fileName;
Label1.Text = "ok";
}

}

protected void Button2_Click(object sender, EventArgs e)
{
string fileName = FileUpload1.FileName;
if (FileUpload1.HasFile)
{


FileUpload1.SaveAs("D://Images/" + fileName);
// img.ImageUrl = "~/Images/" + fileName;
}
Label1.Text = fileName;

}

Hope it's useful for you.


Best Regards,


Michelle Ge



[RESOLVED] Ajax Control CollapsiblePanelExtender Not working


Hi there,


I am trying to use a Ajax CollapsiblePanelExtender  in a web page but that dosent work. Am I  missing some thing ? Here is the code




















Header







   























































































































































 







 
 







 
 







 
 







 
 







 
 







 
 







 
 









 
 







 
 

 


 
 










    


























CollapseControlID="pnlheader" CollapsedImage="expand_blue.jpg" ExpandControlID="pnlheader" ExpandedImage="collapse_blue.jpg"


ImageControlID="imgToggle" SuppressPostBack="True" TargetControlID="pnlRegisterUser" CollapsedText="Show Details...." ExpandedText="Hide Details..." Collapsed="True">







Finally got it working by using ToolScript Manager instead of ScriptManager. But then the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?



Hi,




N1ZAM


Finally got it working by using ToolScript Manager instead of ScriptManager


It is always preferred to use AjaxToolScriptManager control when AJAX controls are being used.




N1ZAM


the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?


When CSS is applied to the CollapsiblePanelExtender, the inner div that is created also inherits the CSS class.  This causes issues when padding is a property of this style.


Solution: target the div created by the Collapsible Panel extender with the styles that you want


For more information:


SOLVED: CSS Padding Issue in CollapsiblePanelExtender


Hope it helps!


Best Regards!


[RESOLVED] Iframe in update panel not updating


Hi, I am facing this problem that after I upload a new pdf file the iframe in the ajax update panel does not get updated until I did a refresh manually.


I have did a simple dummy to show the error: 


.aspx:


 









Sec Sch Testimonial















.aspx.cs:


protected void UploadButton_Click(object sender, EventArgs e)

{

string admin_number = Label1.Text;

if (FileUpload.HasFile) //check for exist file

{

try

{

string ext = Path.GetExtension(FileUpload.FileName); //check for file extension

if (ext == ".pdf")

{

//string filename = Path.GetFileName(FileUpload.FileName);

FileUpload.SaveAs(Server.MapPath("~/pdf/") + admin_number + ".pdf"); //upload the file to the storage

}

}

catch (Exception ex)

{

}

}

//LinkButton1.Click();

UpdatePanel1.Update();

//refreshContent(admin_number);

//UpdatePanel1.Update();

//pdf_viewer.Attributes.Add("src", "images/testimonial/" + lblAdminNo.Text + ".pdf");


}

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)

{

Label1.Text = DropDownList1.SelectedItem.Value.ToString();

UpdatePanel1.Update();

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

string file = Server.MapPath("~/pdf/" + Label1.Text + ".pdf");

if (System.IO.File.Exists(file))

{

pdf_viewer.Attributes.Add("src", "pdf/" + Label1.Text + ".pdf");

}

else

{

pdf_viewer.Attributes.Add("src", "http://www.google.com");

}

UpdatePanel1.Update();

}



Hi,


According to your description and the code you provided, you put the upload control into UpdatePanel, so far as I know, as you place FileUpload control in UpdatePanel and try to upload the file asynchronously using the
HasFile property of the FileUpload Control will always be false. So we will add
PostBackTrigger.


There is a demo, I have tested it ok, please refer to the code below:














<%----%>



The code behind:


 protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{

string fileName = FileUpload1.FileName;
FileUpload1.SaveAs("D://Images/" + fileName);
//img.ImageUrl = "~/Images/" + fileName;
Label1.Text = "ok";
}

}

protected void Button2_Click(object sender, EventArgs e)
{
string fileName = FileUpload1.FileName;
if (FileUpload1.HasFile)
{


FileUpload1.SaveAs("D://Images/" + fileName);
// img.ImageUrl = "~/Images/" + fileName;
}
Label1.Text = fileName;

}

Hope it's useful for you.


Best Regards,


Michelle Ge



[RESOLVED] Ajax Control CollapsiblePanelExtender Not working


Hi there,


I am trying to use a Ajax CollapsiblePanelExtender  in a web page but that dosent work. Am I  missing some thing ? Here is the code




















Header







   























































































































































 







 
 







 
 







 
 







 
 







 
 







 
 







 
 









 
 







 
 

 


 
 










    


























CollapseControlID="pnlheader" CollapsedImage="expand_blue.jpg" ExpandControlID="pnlheader" ExpandedImage="collapse_blue.jpg"


ImageControlID="imgToggle" SuppressPostBack="True" TargetControlID="pnlRegisterUser" CollapsedText="Show Details...." ExpandedText="Hide Details..." Collapsed="True">







Finally got it working by using ToolScript Manager instead of ScriptManager. But then the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?



Hi,




N1ZAM


Finally got it working by using ToolScript Manager instead of ScriptManager


It is always preferred to use AjaxToolScriptManager control when AJAX controls are being used.




N1ZAM


the page has CSS which gets disturbed when expanding and collapsing the control. Any work around on this?


When CSS is applied to the CollapsiblePanelExtender, the inner div that is created also inherits the CSS class.  This causes issues when padding is a property of this style.


Solution: target the div created by the Collapsible Panel extender with the styles that you want


For more information:


SOLVED: CSS Padding Issue in CollapsiblePanelExtender


Hope it helps!


Best Regards!