1
멀티 뷰 컨트롤이있는 .net 페이지가 있습니다. 첫 번째 "보기"에서는 사용자가 채울 필요가있는 양식 (데이터가 데이터베이스에 저장 됨)이 있으며 두 번째 "보기"는 방금 작성한 ID 및 '감사'메시지를 가져옵니다. 괜찮아. 두 번째 "보기"에 '이 페이지 인쇄'링크를 추가하여 사용자가 ID를 인쇄 할 수 있도록했습니다 (전자 메일 수신). 그러나 두 번째 "보기"에서 링크 버튼을 누르면 첫 번째보기로 돌아갑니다. 무슨 일이야?멀티 뷰가 첫 번째보기로 돌아 가기
<asp:MultiView id="MultiView1" runat="server" ActiveViewIndex="0">
<asp:View id="View1" runat="server">
fields here
</asp:View>
<asp:View id="View2" runat="server">
<asp:Label ID="Label1" runat="server"></asp:Label>
<p>
<img alt="print" style="vertical-align:middle" src="images/printing.gif" /> <asp:LinkButton ID="LinkButton1" OnClientClick="window.print();" runat="server">
Remember to print this page</asp:LinkButton></p>
</asp:View>
</asp:MultiView>
코드 숨김 :
이 내 코드입니다
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
InsertNew()
End Sub
Sub InsertNew()
'all code here for inserting in database then
MultiView1.SetActiveView(View2)
Label1.Text = Text here with message
End Sub
그걸 알아야만합니다! 많은 감사합니다! – netNewbi3