ASP.NET 기초 강의실

시삽: 레드플러스 님 
게시판 이동:
 제목 : [6] Presentation Layer : UI : RedPlusMemo.ascx
글번호: 305
작성자: 레드플러스
작성일: 2008/07/16 오전 11:03:00
조회수: 7556
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RedPlusMemo.ascx.cs" Inherits="Memo_RedPlusMemoControl" %>
<table style="width: 100%">
    <tr>
        <td align="center">
            메모 입력<br />
            <br />
            이름:<asp:TextBox ID="txtName" runat="server" Width="129px"></asp:TextBox>
            이메일:<asp:TextBox ID="txtEmail" runat="server" Width="140px"></asp:TextBox>&nbsp;<br />
            메모:<asp:TextBox ID="txtTitle" runat="server" Width="199px"></asp:TextBox>
            <asp:Button ID="btnWrite" runat="server" Text="메모 남기기" OnClick="btnWrite_Click" ValidationGroup="MemoWriteForm"
                Width="130px" /><br />
            <br />
            <asp:RequiredFieldValidator ID="valName" runat="server" ErrorMessage="이름을 입력하시오."
                ControlToValidate="txtName" ValidationGroup="MemoWriteForm" Display="None" SetFocusOnError="true"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="valEmail" runat="server" ErrorMessage="이메일을 정확히 입력하시오."
                ControlToValidate="txtEmail" ValidationGroup="MemoWriteForm" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                Display="None" SetFocusOnError="true"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="valTitle" runat="server" ErrorMessage="메모를 입력하시오."
                ControlToValidate="txtTitle" ValidationGroup="MemoWriteForm" Display="None" SetFocusOnError="true"></asp:RequiredFieldValidator><asp:ValidationSummary
                    ID="valSummary" runat="server" ValidationGroup="MemoWriteForm" ShowMessageBox="true"
                    ShowSummary="false" />
            <%@ register assembly="TaeyoNet.Lib" namespace="TaeyoNetLib" tagprefix="cc1" %>

            <script language="javascript" type="text/javascript">
//풍선 도움말 스크립트
function sample_string_view(ans, typea) {
    var obj = document.getElementById(typea);
    if (ans) {
        obj.style.top = window.event.clientY + document.body.scrollTop + 10;
        obj.style.left = window.event.clientX + document.body.scrollLeft + 10;
        obj.style.display = "block";
    }
    else {
        obj.style.display = "none";
    }
}
function sample_string_move(objName) {
    var obj = document.getElementById(objName);
    if (obj.style.display == "block") {
        obj.style.top = window.event.clientY + document.body.scrollTop + 10;
        obj.style.left = window.event.clientX + document.body.scrollLeft + 10;
    }
}
            </script>

            <asp:DropDownList ID="lstSearchField" runat="server">
                <asp:ListItem Value="None">선택하세요</asp:ListItem>
                <asp:ListItem Value="Name">이름</asp:ListItem>
                <asp:ListItem Value="Title">메모</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="txtSearchQuery" runat="server"></asp:TextBox>
            <asp:Button ID="btnSearch" runat="server" Text="검색" OnClick="btnSearch_Click" ValidationGroup="MemoSearchForm" />
            <asp:GridView ID="ctlMemoList" runat="server" AutoGenerateColumns="false" Width="100%">
                <Columns>
                    <asp:HyperLinkField HeaderText="번호" DataTextField="Num" DataNavigateUrlFormatString="AdminMemoDelete.aspx?Num={0}"
                        DataNavigateUrlFields="Num" />
                    <asp:BoundField HeaderText="작성자" DataField="Name" />
                    <asp:TemplateField HeaderText="메모" ItemStyle-HorizontalAlign="Left">
                        <ItemTemplate>
                            <table>
                                <tr>
                                    <td nowrap>
                                        <div style="width: 250px; overflow: hidden;">
                                            <a href="#" onmouseover="sample_string_view(true, 'Memo<%# Eval("Num") %>');" onmousemove="sample_string_move('Memo<%# Eval("Num") %>');"
                                                onmouseout="sample_string_view(false,'Memo<%# Eval("Num") %>');">
                                                <%# Eval("Title") %>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            <!-- 풍선도움말 -->
                            <div id='Memo<%# Eval("Num") %>' style="display: none; left: 465px; position: absolute;
                                top: 270px">
                                <table border="0" cellpadding="0" cellspacing="1" bgcolor="#6bbaef" id="Table1576">
                                    <tr>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="5" bgcolor="#ffffff" width="300" id="Table1576s">
                                                <tr>
                                                    <td align="JUSTIFY">
                                                        <font color="#336600">이 름 :
                                                            <%# Eval("Name") %></font><br>
                                                        <font color="#ff0000">이메일 :
                                                            <%# Eval("Email") %></font><br>
                                                        <hr style="height: 1px; color: #DDDDDD;">
                                                        <font color="blue">
                                                            <%# Eval("Title") %></font><br>
                                                        <hr style="height: 1px; color: #DDDDDD;">
                                                        <font color="#336699">작성일 :
                                                            <%# Eval("PostDate") %></font><br>
                                                        <font color="#336699">IP주소 :
                                                            <%# Eval("PostIP") %></font><br>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <!-- /풍선도움말 -->
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="작성일" DataField="PostDate" DataFormatString="{0:yyyy-MM-dd}"
                        HtmlEncode="False" />
                </Columns>
            </asp:GridView>
            <cc1:PagingHelper ID="PagingHelper1" runat="server" Next10ImageUrlA="images/NEXT10_A.gif"
                Next10ImageUrlB="images/NEXT10_B.gif" NextImageUrlA="images/NEXT_A.gif" NextImageUrlB="images/NEXT_B.gif"
                OnOnPageIndexChanged="PagingHelper1_OnPageIndexChanged" Prev10ImageUrlA="images/PREV10_A.gif"
                Prev10ImageUrlB="images/PREV10_B.gif" PrevImageUrlA="images/PREV_A.gif" PrevImageUrlB="images/PREV_B.gif" />
            <asp:RequiredFieldValidator ID="valSearchField" runat="server" ErrorMessage="검색할 필드를 선택하시오."
                ControlToValidate="lstSearchField" InitialValue="None" Display="None" SetFocusOnError="true"
                ValidationGroup="MemoSearchForm"></asp:RequiredFieldValidator>
            <asp:RequiredFieldValidator ID="valSearchQuery" runat="server" ErrorMessage="검색어를 입력하시오."
                ControlToValidate="txtSearchQuery" SetFocusOnError="true" Display="None" ValidationGroup="MemoSearchForm"></asp:RequiredFieldValidator>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="MemoSearchForm"
                ShowMessageBox="true" ShowSummary="false" />
            <br />
            <br />
            <asp:LinkButton ID="btnClose" runat="server" OnClick="btnClose_Click" Visible="False">검색 종료</asp:LinkButton>
        </td>
    </tr>
</table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
 
이전 글   다음 글 삭제 수정 답변 글쓰기 리스트


관련 아티클 리스트
  제       목 파일 작성자 작성일 조회
이전글 GridView로 리스트 출력시 번호를 순서대로 - 레드플러스 2009-08-13 6599
  [!] 3Tier + Enterprise Library 한줄 메모장(Memo Appl... - 레드플러스 2008-07-16 6291
  [1]한줄메모장 작성을 위한 테이블 및 저장 프로시저 작성 - 레드플러스 2008-07-16 6718
  [2] Visual Studio 2008 Solution Explorer 구성 WebMemoEL.jpg(59 KB) 레드플러스 2008-07-16 5478
  [3] DB Layer : Database Abstract Class : DataPr... - 레드플러스 2008-07-16 5676
  [3][1] SQL Server 전용 DB 처리 : SqlDataProvider.cs - 레드플러스 2008-07-16 6027
  [4] Biz로직 : Entity Class : MemoInfo.cs - 레드플러스 2008-07-16 4676
  [5] Business Layer : Controller Class : MemoCon... - 레드플러스 2008-07-16 5246
현재글 [6] Presentation Layer : UI : RedPlusMemo.ascx - 레드플러스 2008-07-16 7556
  [6][1] RedPlusMemo.ascx.cs - 레드플러스 2008-07-16 4802
다음글 [!] 답변형 게시판 : /WebReply/ - 레드플러스 2008-07-14 5834
 
손님 사용자 Anonymous (손님)
로그인 Home