Problem with view control redirecting to another view control

I have a module with an ascx view control and a second ascx view control with key MakeTest

When the user  clicks in a hyperlink i'm using this in order to redirect him to the other view control:

Response.Redirect(Globals.NavigateURL(TabId, "MakeTest", "mid=" + ModuleId));

This works, but when you're on the second view control (MakeTest) the other modules from the same tab dissapears as when you're in edit mode

Can't this be avoided somehow?

I have a banners module at the top in all pages, but it's very sad to see it dissapear when i'm still in view mode.

Please help me,
Thanks

BTW, the behaviour in edit mode is one of the most strange and non orthogonal behaviours of DNN.

0
emumanu
4/18/2005 11:16:14 PM
asp.net.dotnetnuke 25171 articles. 0 followers. Follow

6 Replies
825 Views

Similar Articles

[PageSpeed] 51

I agree with you.

I would like to see us have the viewcontrols loaded in the same skin and the edit controls loaded int he admin skin for editing the data... best of both worlds...


Steve Walker
Senior Consultant
SharePoint Forums
SharePoint Architecture
0
Imsoccrman
4/19/2005 1:35:33 AM
Yes, I agree with you. This is one of the most non intuitive behaviour of DNN. This is should be fixed some how because the design was bad IMO.
0
carrisian
4/19/2005 11:08:40 AM
Well, personally i do not like the concept of admin skin for editing data if you can't set different skins for different pages when editing the data... too limiting. It makes no sense to have a decent skin engine and don't allow to exploit it fully...
0
emumanu
4/19/2005 12:02:14 PM

I think we should have the capability for both... If the ViewControls l,oaded int he regular skin and the edit controls loaded in the admin skin, you could make your module work however you prefer... sometimes i like to have all of the screen real estate for editing... sometimes it is overkill.. I'd like to be able to choose.

FYI - When I say View Contrl and Edit Control I am referring to using NavigateURL and EditURL respectively.. they both load a module control but if one loaded in the original sin and the other in the Admin Skin then I think we could cover both scenario's for people.. you could still edit data with a ViewControl :-)


Steve Walker
Senior Consultant
SharePoint Forums
SharePoint Architecture
0
Imsoccrman
4/19/2005 1:23:38 PM

I agree, by simply "replacing" the master module control with the view control the page integrity is maintained. This shouldnt be to difficult, after reading this thread  I got it to work (a little buggy still but proof of concept anyway). The concept so far:  isViewControl Function **not included** simply checks the url and the ctl thats being loaded - if the ctl has a type of view and the the id's are different - that is its not the master module. then return true then just copy the controlsource and a few other properties into a Moduleinfo - find the master module in the activetabs modules and replace it, in the code below I actually remove it and add another back in but there is no need to that. The code below is def. not the solution as other issues would need to be addressed - caching for starters, and a few others.

this testing code was placed in skin.vb init right after isadminmodule --- wich also needs modified--

I would like to see this get done in some form or another, redirecting within your custom module without being in a admin or edit scenerio would really help with large custom modules.

If IsViewControl() Then

Dim arrViewModules As ArrayList

Dim modKey As String

If Not IsNothing(Request.QueryString("ctl")) Then

modKey = Request.QueryString("ctl")

End If

Dim objViewModuleControls As New ModuleControlController

'Get the active module - and replace it

Dim ModId As Integer = -1

Dim defId As Integer = -1

If Not IsNothing(Request.QueryString("mid")) Then

ModId = Int32.Parse(Request.QueryString("mid"))

End If

Dim objModControl As ModuleControlInfo

objModule = objModules.GetModule(ModId, PortalSettings.ActiveTab.TabID)

defId = objModule.ModuleDefID

arrViewModules = objViewModuleControls.GetModuleControlsByKey(modKey, objModule.ModuleDefID)

If arrViewModules.Count > 0 Then

objModControl = CType(arrViewModules(0), ModuleControlInfo)

End If

'objmodulecontrol is not a objmodule

Dim removeIndexN As Integer = -1

For removeIndexN = 0 To PortalSettings.ActiveTab.Modules.Count - 1

objModule = CType(PortalSettings.ActiveTab.Modules(removeIndexN), ModuleInfo)

If defId = objModule.ModuleDefID Then

Exit For

End If

Next

PortalSettings.ActiveTab.Modules.RemoveAt(removeIndexN)

objModule.ModuleDefID = objModControl.ModuleDefID

objModule.ModuleControlId = objModControl.ModuleControlID

objModule.ControlSrc = objModControl.ControlSrc

objModule.ControlTitle = objModControl.ControlTitle

PortalSettings.ActiveTab.Modules.Add(objModule)

End If

 

 

0
xxRichxx
4/19/2005 1:25:54 PM
can you post the is view control function as well
Dylan Barber
read my stupid blog http://codemypantsoff.com
Pants Optional!
0
codegalaxy
5/13/2005 6:52:42 PM
Reply:

Similar Artilces:

Group controllers and view in folders under the /Controllers and /Views folders
I'm working on an application that has a few different parts, so I want to have urls like this:/PartA/controller/action/PartB/controller/actionI would like create folders named PartA and PartB under the Controllers and Views folders. I also want them to be in their own namespaces. What kind of routes should I add for this so they are found with the above urls?Thanks! Hi random0xff, You can put your Controller classes in any folders or namespaces you like. When looking for the controller "Blah", the framework will scan all your referenced assemblies for a class called BlahCon...

Can't drag any control INTO a view control... places new control at top right of design view.
VS 2005 created new web site.On default.aspx design view I added a Multiview control. I then added a View control within that.Here's the problem.  I can't place any controls inside of the view control.  If I drag a new button from the toolbox into the view control that I have in place, the button ends up in the top left of the design view. If I then Cut and paste the button into the View control, the button still ends up outside of the view control in the top left corner of the design view. What's causing this?  I have seen this done in many of the w...

navigate from Edit control back to the view control when the view control needs parameter in the url ( ver 2.1.2)
Hi, I am writing a module for 2.1.2. The view control is loaded based on a "&itemId=" parameter appended to the url. The module has Edit and Add controls. I use the same ascx page for both (register the same page twice as Add and Edit). Navigation to the Edit is done by using EditUrl("itemId", itemId, "Edit") and navigation to the Add is done by using EditUrl("itemId", -1, "Add"). This goes well. The problem is going back from both Edit and Add to the view, when clicking update, delete or cancel. I've tried EditUrl("itemId",itemId, "") going back from the Edit, but I get the "mid=...

How can a custom control view another control property ?
Hello, I have a custom control on a page. However, its value is dependant upon another control's value. Is there a way for the custom control to 'see' other controls on the same page ? I guess the only way I could do this is through a global variable ? Hello my friend, Both of these controls would be on the same page.  The Page_PreRender method of the page executes after controls within it have been loaded.  Therefore, within the Page_PreRender event of the asp page you would have the following: - MyUserControl1.lblMessage.Text = TextBox1.Text This assumes lblMessage is a lab...

Move user control from one view to another view in Multiview
Hi, I am using Mutliview control, and want to move a user control from one view to another view based on user selection. I can do this by placing a "Placeholder" control in each views. Based on the user selection, remove the control from the placeholder and add to annother placeholder as: Me.divViewHome.Controls.Remove(Me.DiySearchSide1)Me.divViewResults.Controls.Add(Me.DiySearchSide1) For the first time when moving the usercontrol to another placeholder, the viewstate of the user control is working fine. Do postback by pressing any button within the usercontrol is working fine ...

Binding Sitemap to Tree View Control in a User Control Causes Problems
I didn't know how to put it, but my problem is;  I have a page, and there are some User Controls registered to that page. One of the user controls have a treeview control that I bind sitemap. IT works great, it pulls out the sitemap data.  But the problem is, it renders the links as;  applicationfolder/usercontrolfolder/file.aspx while normally it must be like; applicationfolder/file.aspx  are there any solution for this?   i have found this post, http://forums.asp.net/thread/1226414.aspx but OnNodeDataBound attribute doesn't really work? any ideas? Hi...

Wizard Control
Hi All, I have simple wizard control. The first step contains checkboxes and depending upon which checkboxes were selected, I want hide (skip) steps in wizard control. I am using <code>ReportDataWizard.WizardSteps[1].Visible = true</code>  but getting following error. Please help.  The Visible property of a View control can only be set by setting the active View of a MultiView. Hi,See this quickstart tutorial http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/standard/wizard.aspx Specifically look at the section Wizard NonLinear Navigationand Sc...

DotNetNuke: How to view user control Module by giving control Key in module definition
 I'm not viewing the usercontrol page when I'm giving Control key name in the module definition. but its shows if not giving control key name.I want to navigate from one user control page to another page module..I've written the coding as shown in below.. Response.Redirect(Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "ControlKeyValue", "mid=" + ModuleId.ToString())); Its showing blank page when I'm executed...can anyone help me to solve this problem..?Thanks in advance..!Muthupandian ...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this?  AllAboutFocus.com. Information Technolo...

need some feedback on using a multiview control that displays data in a formview control on the fourth view after making selections with radiobuttons on the previous views
I need some feedback on using a multiview control that displays data in a formview control on the fourth view after making selections with radiobuttons on the previous views. I am designing a webpage that allows the user to make certain selections with radio buttons that displays information about the selections on the last view but it seems the web page may be storing there selections in a cache or something because sometimes the last view wont change when I make a different selection with the radiobutton but for the most it changes upon selection but sometimes it wont view the changes...

Problem viewing a control
I added a control in DNN. I tied the control to my Self Reporting tab I created. When I tried to load the page I got this error message:   Error loading moduleDotNetNuke.ModuleLoadException: Unhandled Error Loading Module ---> System.InvalidCastException: Specified cast is not valid. at DotNetNuke.Skin.InjectModule(Control objPane, ModuleSettings ModuleSettings, PortalSettings PortalSettings) in C:\Documents and Settings\Administrator\VSWebCache\myaans\admin\Skins\Skin.vb:line 543 --- End of inner exception stack trace ---...

Problems with View Control
For some reason I can't drop controls on my view control unless I first add a paragraph and then put the controls inside the paragraph. Does anyone know what is going on with this?Thanks In Advance   You should view the source html code on your control in the deisigner you're using.  (Is it Visual Studio? Web Developer?)  and verify that it looks (is structured) something like this for an .aspx page : //Control register declarations<%@ Register TagPrefix="portal" TagName="Ctrl1" Src="~/Directory/Control1.ascx" %> <%@ Page La...

Controlling the views in the Password Recovery Control
I have a password recovery control on one of my pages.  Is there anyway that I can programmatically control which of the 3 views is displayed (Username, Question or Success)?  I am asking because I want to add a back button on the Question View in case the user entered the wrong username in the Username view.   Thanks...

Control Property. Control or View State?
Hello, I am creating a control which I will compile in a class. I am having problems when I use a property in the View State:     ' Items     <Bindable(True), Category("Data"), DefaultValue(""), Localizable(True)> _     Property Items() As Generic.List(Of String)       Get         If ViewState("Items") Is Nothing Then           Return New Generic.List(Of String)         Else           Return ViewState("I...

Web resources about - Problem with view control redirecting to another view control - asp.net.dotnetnuke

Advertise - Redirecting - YouTube
Search Call us: 1-855-500-2756 Get started Overview Why it Works Success Stories Get Started Make Video Ads Resources This page has moved. Redirecting ...

Aboriginal funds need redirecting - report
Aboriginal funds need redirecting - report

Freedom of speech: Redirecting our society to a dangerous course
Freedom of speech: Redirecting our society to a dangerous course

Leaked Federal Government mental health report recommends redirecting $1 billion from acute hospital ...
A report commissioned by the Federal Government recommends redirecting money from acute hospital care to community-based mental health services. ...

Sona talked of redirecting voters to wrong polls, court hears in robocalls trial
Michael Sona was overheard talking about American-style campaign politics to redirect voters to the wrong polling stations in the 2011 federal ...

Unscrupulous website adverts again redirecting some users to App Store from Safari
... granting any kind of permission… In iOS 8 beta 2, Apple supposedly had remedied the issue: “Safari now blocks ads from automatically redirecting ...

Play Store May Be Redirecting Some Search Terms To The Predefined Categories
The user experience on Android is never standing still, which is no more evident than in the Play Store itself. It seems Google may be trying ...

Redirecting...
Please wait — redirecting to new Business page...

Redirecting...
Click here if you are not redirected

Redirecting Financial Flow To Asia Pacific Crucial For Region’s Sustainable Growth
... (UNEP) notes, the Asia Pacific region is home to over half of the world’s population, but much less than half its natural resources. Redirecting ...

Resources last updated: 1/22/2016 8:17:38 PM