I have read that it is not a good idea (or just straight not possible) to put ModalPopups and DynamicPopulates in Site.master. However, if I wanted to have a link in the header/footer that opened up a popup which loaded information via a DynamicPopulate, how would that be accomplished?
I've seen comments telling people to make a web user control which I did but I get the same error I got without the extra custom user control: "Web service call failed: 500". I don't think it is an err开发者_如何学Cor with my webmethod:
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static string LoadPageToBeLoaded(string contextKey)
{
return "hello";
}
Putting the objects that call this code anywhere but the masterpage yields the results I want but short of copy-pasting the code into all of the pages at the bottom (that's what the single footer is for anyway, right?) I'm not sure how to approach this.
Thanks.
EDIT: I've found out that webmethods are not allowed in user controls, so that solves that issue. But it still seems like there should be a simple way to open a modal popup and load information into it with a dynamic populate in the header or footer of a site.
精彩评论