Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module NvigationModule Nvigation
Previous
 
Next
New Post
2/8/2008 8:14 AM
 

If u'r target control/module is another page this can be done easily. You just have to know the name of the target page or its tabid.

string baseUrl = Globals.NavigateUrl(tabId)

string url = baseUrl + "?competencyId=" + id

Response.redirect(url);

May be I scaled down your question. Anyway, worth trying :)

 
New Post
2/8/2008 9:36 AM
 

hi sandeep, how r u?

i saw show your upset face{smiley} and that was really horrible {just kidding}

so don't worry.

i think you have to create one page put your control in this page what ever you want.

and use NavigateUrl() function pass your para and just redirect to this page. and you will get this the id in the module.

And HA!!!

what ever you write Be clear.

 
New Post
2/12/2008 5:04 AM
 

Hi sahil,

 

        No, actually i was under heavy pressure.Anyaway i will try it out.Thanks for your reply.

Regards,

Sandeep.M 

 
New Post
2/13/2008 6:44 AM
 

Hey sandip,

    I know what you want to do. And if i'm right you want to redirect to a module where you want to display a specific control according to query string. right?

If this is right, do following:

Add a new control in your module called _default.ascx and add following code there:

_default.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="_Default.ascx.cs" Inherits="_Default" %>
<asp:PlaceHolder ID="phMain" runat="server"></asp:PlaceHolder>
in .cs:

partial class _Default : PortalModuleBase
    {
        private string m_ModuelControl = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadModuleControl();
        }
        private void LoadModuleControl()
        {
            TabController obj = new TabController();
            TabInfo objTab = obj.GetTab(TabId);
            string barKey = string.Empty;
            barKey += objTab.TabName.Trim();
            if (Request.QueryString["mctl"] != null)
                barKey = Request.QueryString["mctl"].ToString();
            else
            {
                switch (objTab.TabName.Trim().ToLower())
                {
                    case "sysupd":
                        m_ModuelControl = "Navigation_Mail_MailSideBar.ascx";
                        break;

                }

    }
                if (!string.IsNullOrEmpty(m_ModuelControl))
                {
                    PortalModuleBase objPortalModuleBase = (PortalModuleBase)LoadControl(m_ModuelControl);
                    objPortalModuleBase.ModuleConfiguration = ModuleConfiguration;
                    objPortalModuleBase.ID = System.IO.Path.GetFileNameWithoutExtension(m_ModuelControl);
                    phMain.Controls.Add(objPortalModuleBase);
                    return;
                }
            }

 

This should be done in a module where you need to dispplay your control according to querystring param.

now comes the redirection part.

add following at the top of your page:

using DotNetNuke.Entities.Tabs;

then where you want to redirect use this:

    TabController objtab = new TabController();
     TabInfo objtabinfo = new TabInfo();
      objtabinfo = objtab.GetTabByName("<Tab Name>",PortalId);
      Response.Redirect(Globals.NavigateURL(objtabinfo.TabID,"","mctl=Contacts")));           

remember here the mctl goes into querystirng.

I hope this helps.

tell me if I misunderstood your prob.


Find out code snippets, tutorials and How Tos' about dotnetnuke at lakhlaniprashant.blogspot.com Umlimited wedding planning tips, free wedding websites and more at http://www.FirstPhera.com an indian dotnetnuke portal dedicated to wedding planning!
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module NvigationModule Nvigation


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out