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 navigation AFTER validationModule navigation AFTER validation
Previous
 
Next
New Post
6/30/2007 9:45 PM
 

My Edit module has a FormView with DefaultMode = Edit with corresponding Update and Cancel Link buttons. The Update button CausesValidation=True and the cancel button is false. I set the click event of the Cancel button to what you see below and it returns me to the View module as expected. Likewise, the Update linkbutton executes the stored procedure and does the update, but I want it to navigate back to the View module when it's done. I tried to include the below code in the click event of the Update linkbutton but it bypasses the CausesValidation event and does not execute the stored procedure. How do I acheive my  goal of navigating back to the View module after validation?

Protected Sub UpdateCancelButton_Click(ByVal sender As Object, ByVal e AsSystem.EventArgs)
  Dim objModules As Entities.Modules.ModuleController = New Entities.Modules.ModuleController
  Response.Redirect(NavigateURL(), True)
End Sub

 
New Post
7/1/2007 12:55 AM
 

Can we see the method that fires when the Update linkbutton is clicked?

(right now it appears you are showing us the method that fires when the cancel button is clicked).

I think that you should be able to put the Response.Redirect(NavigateURL(), True) code in the Update linkbutton method.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/1/2007 6:20 PM
 

Hi Michael,

It simply executes an update stored procedure. Be aware, it is a seperate database than DNN entirely, I just included a second connection string in my web.config. I use the designer to create my data sources using this additional connection string.  There's nothing in the codebehind for the UpdateButton, only the UpdateCancelButton as you've seen in the post so I can return to the View control. Here's what I got:

<

asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />

 

<UpdateParameters>
  <asp:Parameter Name="PatchListID" Type="Int32" />
  <asp:Parameter Name="PatchLabel" Type="String" />
  <asp:Parameter Name="PatchDesc" Type="String" />
  <asp:Parameter Name="ComplianceDate" Type="DateTime" />
  <asp:Parameter Name="AFCertURL" Type="String" />
  <asp:Parameter Name="VendorURL" Type="String" />
  <asp:Parameter Name="Notes" Type="String" />
  <asp:Parameter Name="DoNotUse" Type="Boolean" />
</UpdateParameters>

 
New Post
7/1/2007 9:12 PM
 

If you're using an ObjectDataSource Control (you must be if you have no code behind) you can use the:

ObjectDataSource.Updated Event (System.Web.UI.WebControls)

http://www.google.com/search?hl=en&safe=off&q=objectdatasource+control+updated+event

It is fired after the update occurs.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/2/2007 11:25 AM
 

Thanks Michael, I was successful with the following code:

Protected Sub SqlDataSource1_Updated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SqlDataSource1.Updated
  Dim objModules As Entities.Modules.ModuleController = New Entities.Modules.ModuleController
  Response.Redirect(NavigateURL(),
True)
End Sub

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module navigation AFTER validationModule navigation AFTER validation


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