Been going thtough and online video tutorial (Lynda.com.ASP.NET.Essential.Training) and in one of the video they are added a CS code to direct the user from the entry form back to the list view... but my version of web developer is using VB... can anyone
help me to translate the attached document into VB...
Superguppie.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub DetailView_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles DetailView.ItemInserted
If (e.AffectedRows = 1) Then
Response.Redirect("~\Authors.aspx")
End If
End Sub
End Class
sam233
Member
36 Points
218 Posts
Redirecting page requests help
May 23, 2012 02:27 PM|LINK
Been going thtough and online video tutorial (Lynda.com.ASP.NET.Essential.Training) and in one of the video they are added a CS code to direct the user from the entry form back to the list view... but my version of web developer is using VB... can anyone help me to translate the attached document into VB...
thanks again
Confused Dav...
Member
183 Points
159 Posts
Re: Redirecting page requests help
May 23, 2012 02:36 PM|LINK
Try this site. It'll help you in the future too, so make sure to add it to your favorites.
http://www.developerfusion.com/tools/convert/csharp-to-vb/
sam233
Member
36 Points
218 Posts
Re: Redirecting page requests help
May 23, 2012 02:45 PM|LINK
great site my friend.... thanks for the link...
but why am i getting the following error message
-- line 14 col 12: this symbol not expected in EmbeddedStatement
superguppie
All-Star
48225 Points
8679 Posts
Re: Redirecting page requests help
May 24, 2012 12:42 PM|LINK
Please post line 14.
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
When all you've got is a Hammer, Every Problem looks like a Nail. Michael Swain.
kashifilyaz
Participant
1144 Points
198 Posts
Re: Redirecting page requests help
May 24, 2012 12:53 PM|LINK
Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub DetailView_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles DetailView.ItemInserted If (e.AffectedRows = 1) Then Response.Redirect("~\Authors.aspx") End If End Sub End ClassBelow is aspx code
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <p> <asp:DetailsView ID="DetailView" runat="server" Height="50px" Width="125px"> <p /> </asp:DetailsView> </asp:Content>