开发者

Navigating between DotNetNuke module controls using EditURL() or NavigateURL()

OK I'm new to DotNetNuke and need to write a simple module in DNN that will display an article for everyone, and allow the admin to edit the article/add a new one.

I have a test page that contains a DNN module with one module definition and two controls in that definition. The default control shows the article based on an articleID field in the querystring. You then click a button that is supposed to load the edit control and pass the articleID in the query string.

If I use EditURL() in the onClick the edit control is loaded with the correct articleID, but using t开发者_开发百科he admin skin. If I use Globals.NavigateURL() then the correct skin is shown but my edit control isn't loading in the page.

Any clue as to how to what I'm doing wrong or how to get the edit control loading with the correct skin?

My two methods of switching to the edit control (in my button click event) are listed below:

string newURL = this.EditUrl("articleID", Request.QueryString["articleID"], "EditArticle");

        Response.Redirect(newURL);

and

        string newURL = Globals.NavigateURL(this.TabId, "EditArticle","articleID="+Request.QueryString["articleID"]);

        Response.Redirect(newURL);


Actually you are doing this correctly - the editurl in DNN does load the Admin skin - usually this skin is based on someone administering content so it strips out all other modules and shows the 'basics'. Right or wrong this is what it does.

If you dont want to to do that you could provide a switch in the querystring and show a seperate panel or do a multiview control and show different views based on the switch in the query string.

There are a few other approaches like changing the content area to editing text area with ajax or using popup modal style windows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜