Showing posts with label posting. Show all posts
Showing posts with label posting. Show all posts

Wednesday, March 28, 2012

Change Mask of MaskedEditExtender?

Is it possible to change the Mask of a MaskedEditExtender without posting back?

I have a field for telephone number in format "999-9999"

When the checkbox beside the textbox is checked, it should change to "(999)-999-9999" format, and should go back to previous format when unchecked.

Hi Seven21,

Try out this.

if (CheckBox1.Checked)

{

TextBox1_MaskedEditExtender.Mask ="999-9999";

}

else

TextBox1_MaskedEditExtender.Mask ="(999)-999-9999";

Change content pages of Master Page without Master Page posting back?

so Master + content pages seems like exactly what I want except that they are assembled on postbacks. I am trying to make a site where both Master and Content pages have updatepanels, and the site switches content pages (40+ content pages) without the master page refreshing. Master Pages are assembled on postbacks so I don't think simple master page will work without annoying postbacks. I tried an approach where load content pages inside an Iframe, but the content pages take too long to load becuase each content page loads its own scriptmanager. View/Multiview will probably work but difficult to develop a 40 view multiview, I would rather develop 40 separate aspx pages. Any ideas on making any of these three approaches work well? either fix masterpage postback, or fix Iframe load times, or fix View/Multiview eaase of development?

THanks!

Todd Wilder

I think you are looking at the problem backwards - you have to change the MasterPage of the content page. this.Page.MasterPageFile property.

Another option which I successfuly have deployed is dynamically loading a usercontrol into a placeholder on the masterpage.