как добавить картинку справа от ASP формы

 
0
 
.NET
ava
bulat01 | 27.03.2013, 15:57
Здравствуйте все,

страница: selection.aspx

форма поиска c 6 полями выборки;
хочу справа от этой формы добавить (простую) картинку (с установкой высота, ширина картинки, никакой логики) - все перепробывал - впустую потратил время.
Какой Best Practice (Как правильно по практике это делается)?

Помогите реализовать.

Вот код:



<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selection.aspx.cs" Inherits="AgipKco.MaterialTrackingSystem.Web.selection" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="selection_style.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript">

        //MMT functions
        function txt_MMTSelectedIndexChanged(sender, eventArgs) {
            var mmt_desc = $get("txtMMT").value;
            PageMethods.getMMTID(mmt_desc, MMTCallSuccess, MMTCallSuccess);
        }

        function MMTCallSuccess(res) {
            var dest = document.getElementById('hidMMT');
            dest.value = res;
            window.location = "http://mts.uat.agipkco.com/agipKco.MaterialTrackingSystem/JcnMmt/JcnMmt.aspx?Id=" + dest.value + "&mode=viewPage";
        }

        function MMTCallFailed(res) {
            alert(res.get_message());
        }

        //**********************************************************************************************************
        //Shipping Invoice functions
        function txt_SIIndexChanged(sender, eventArgs) {
            var mmt_desc = $get("txtSI").value;
            PageMethods.getSIID(mmt_desc, SICallSuccess, SICallFailed);
        }

        function SICallSuccess(res) {
            var dest = document.getElementById('hidSI');
            dest.value = res;
            window.location = "http://mts.uat.agipkco.com/agipKco.MaterialTrackingSystem/ShippingInvoice/ShippingInvoice.aspx?Id=" + dest.value + "&mode=viewPage";
        }

        function SICallFailed(res) {
            alert(res.get_message());
        }
     </script>

</head>
<body>
    <form id="form1" runat="server">
    <ajax:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"/>

    <div>
         <table class="selection_component_css">
                 <tr>
                    <td>
                        <asp:Label ID="lblContractors" runat="server" meta:resourcekey="lblContractorsResource1"></asp:Label>
                    </td>
                    <td>
                        <div>
                            <asp:TextBox ID="txtSupplier" runat="server"></asp:TextBox>
                            <ajax:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtSupplier"
                                MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" 
                                ServiceMethod="GetSuppliers" 
                                Enabled="True">
                            </ajax:AutoCompleteExtender>
                        </div>
                     </td>
                </tr>
                 <tr>
                    <td>
                        <asp:Label ID="lblContracts" runat="server" meta:resourcekey="lblContracts"></asp:Label>
                    </td>
                    <td>
                        
                        <div>
                            <asp:TextBox ID="txtContract" runat="server"></asp:TextBox>
                            <ajax:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" TargetControlID="txtContract"
                                MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" 
                                ServiceMethod="GetContracts" 
                                Enabled="True">
                            </ajax:AutoCompleteExtender>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblMMT" runat="server" meta:resourcekey="lblMMT"></asp:Label>
                    </td>
                    <td>
                         <div>
                            <asp:TextBox ID="txtMMT" runat="server"></asp:TextBox>
                            <ajax:AutoCompleteExtender ID="AutoCompleteExtender3" runat="server" TargetControlID="txtMMT"
                                MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" 
                                ServiceMethod="GetMMT" 
                                Enabled="True"
                                OnClientItemSelected = "txt_MMTSelectedIndexChanged">
                            </ajax:AutoCompleteExtender>
                            <asp:HiddenField ID="hidMMT" runat="server"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblShippingInvoices" runat="server" meta:resourcekey="lblShippingInvoices"></asp:Label>
                    </td>
                    <td>
                        <div>
                            <asp:TextBox ID="txtSI" runat="server"></asp:TextBox>
                            <ajax:AutoCompleteExtender ID="AutoCompleteExtender4" runat="server" TargetControlID="txtSI"
                                MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" 
                                ServiceMethod="GetShippingInvoice" 
                                Enabled="True"
                                OnClientItemSelected = "txt_SIIndexChanged">
                            </ajax:AutoCompleteExtender>
                            <asp:HiddenField ID="hidSI" runat="server"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblCCD" runat="server" meta:resourcekey="lblCCD"></asp:Label>
                    </td>
                    <td>
                        <div>
                            <asp:TextBox ID="txtCCD" runat="server"></asp:TextBox>
                            <ajax:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" TargetControlID="txtCCD"
                                MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" 
                                ServiceMethod="GetCCD" 
                                Enabled="True">
                            </ajax:AutoCompleteExtender>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblMaterialsReceipt" runat="server" meta:resourcekey="lblMaterialsReceipt"></asp:Label>
                    </td>
                    <td>
                        <div>
                            <asp:TextBox ID="txtMaterialsReceipt" runat="server"></asp:TextBox>
                            <ajax:AutoCompleteExtender ID="AutoCompleteExtender6" runat="server" TargetControlID="txtMaterialsReceipt"
                                MinimumPrefixLength="1" EnableCaching="true" CompletionSetCount="1" CompletionInterval="1000" 
                                ServiceMethod="GetMaterialsR" 
                                Enabled="True">
                            </ajax:AutoCompleteExtender>
                        </div>
                    </td>
                </tr>
              </table>
              </div>
       </form>

        <div>
          <asp:Image ID="image1" runat="server" ImageUrl="image/MTS_1.jpg"/> 
      </div>

</body>
</html>





Kommentare (1)
ava
diadiavova | 27.03.2013, 19:25 #
Это вопрос скорее по хтмл.
Уж не знаю, что об этом говорят "бэст практисис", но я тут вижу такие решения:
1. Создать таблицу с одной строкой и двумя ячейками. Запихать форму в левую ячейку, а картинку в правую.
2. Использовать таблицу, которая уже есть в форме. Там просто надо добавить в первую строку еще одну ячейку, установить атрибут rowspan="6" и разместить картинку там.
3. Можно поиграться с блочной версткой (свойства css: position, top, left width и height), но по-моему в данном случае это - "из пушки по воробьям".
Registrieren Sie sich oder melden Sie sich an, um schreiben zu können.
Unternehmen des Tages
Вы также можете добавить свою фирму в каталог IT-фирм, и публиковать статьи, новости, вакансии и другую информацию от имени фирмы.
Подробнее
Mitwirkende
advanced
Absenden