troubleshooting Question

Code-Behind out of a Web Page Button Click...

Avatar of kmoloney
kmoloneyFlag for United States of America asked on
.NET ProgrammingASP.NETVisual Basic.NET
4 Comments1 Solution497 ViewsLast Modified:
Hello there...

I have an aspx page with a multiview.  I have a Data List in one of these views, and at the bottom of each datalist section there is are two buttons, one of which, when pressed, needs to execute some fairly complex VB.NET code and go to a third view.

Because the button is inside a view, it doesn't expose itself through vb intellisense.

How can I configure the app so that when I press on this button it will execute CODE-BEHIND VB, rather than having to get it to perform script?

Here's the code for the datalist:

            <asp:DataList ID="DataList1" runat="server" DataSourceID="ODS_Progress" Style="position: relative" DataKeyField="progID" Width="100%">
               
                <ItemTemplate>
                <table width=98% style="font-size:small">
                    <tr>
                    <td width=30%>
                    Comment ID:
                    </td>
                    <td>
                    <asp:Label ID="progIDLabel" runat="server" Text='<%# Eval("progID") %>'></asp:Label>
                    </td>
                    </tr>
                   
                    <tr>
                    <td>
                    Work Order ID:
                    </td>
                    <td>
                    <asp:Label ID="woIDLabel" runat="server" Text='<%# Eval("woID") %>'></asp:Label>
                    </td>
                    </tr>
                   
                    <tr>
                    <td>
                    Comment By:
                    </td>
                    <td>
                    <asp:Label ID="progNoteByLabel" runat="server" Text='<%# Eval("progNoteBy") %>'>
                    </asp:Label>
                    </td>
                    </tr>
                   
                    <tr>
                    <td>
                    Comment Date:
                    </td>
                    <td>
                    <asp:Label ID="progNoteDateLabel" runat="server" Text='<%# Eval("progNoteDate") %>'>
                    </asp:Label>
                    </td>
                    </tr>
                   
                    <tr>
                    <td>
                    Publish?
                    </td>
                    <td>
                    <asp:Label ID="progPublishLabel" runat="server" Text='<%# Eval("progPublish") %>'>
                    </asp:Label>
                    </td>
                    </tr>
                   
                   
                   
                    <tr>
                    <td>
                    Comment / Question:
                    </td>
                    <td>
                    <asp:Label ID="progNoteLabel" runat="server" Text='<%# Eval("progNote") %>'></asp:Label>
                    </td>
                    </tr>
                    <hr />
                </table>
                    <asp:Button ID="btnBack" runat="server" Text="Back to List" />&nbsp;&nbsp;
                    <asp:Button ID="btnRespond" runat="server" Text="Respond" />
                </ItemTemplate>
               
               <AlternatingItemStyle BackColor=#FFFFD0 />
                             
            </asp:DataList>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros