Click here to Skip to main content
14,661,630 members
Home » Discussions » ASP.NET
   

ASP.NET

 
AnswerRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Richard Deeming22-Dec-17 2:11
mveRichard Deeming22-Dec-17 2:11 
GeneralRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Lay_Kay22-Dec-17 5:19
MemberLay_Kay22-Dec-17 5:19 
AnswerRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Richard MacCutchan21-Dec-17 5:18
mveRichard MacCutchan21-Dec-17 5:18 
QuestionHow to ensure user either checks a box or fills out the form? Pin
samflex18-Dec-17 7:48
Membersamflex18-Dec-17 7:48 
QuestionAdvice on Partial View Pin
sunsher17-Dec-17 2:37
Membersunsher17-Dec-17 2:37 
Questionmaintain position DIV on Postback Pin
Member 1317428015-Dec-17 5:42
MemberMember 1317428015-Dec-17 5:42 
AnswerRe: maintain position DIV on Postback Pin
jkirkerx18-Dec-17 8:17
professionaljkirkerx18-Dec-17 8:17 
GeneralRe: maintain position DIV on Postback Pin
Member 1317428018-Dec-17 23:41
MemberMember 1317428018-Dec-17 23:41 
The post script with only one div works, but you can do it better and make it easier to manage.


The new solution

combination with ScriptManager and UpdatePanel components.


1) create a DIV at level Body
2) create script reference for WebForm.js
3) create a DIV for GridView
4) add a UpdatePanel
5) declare structure GridView

important, without update panel the position after a Postback is not maintained


<body style="height: 857px">
    <form id="form1" runat="server">       

     <!-- General DIV for page -->
     <div>        
        <!-- Script Manager -->
        <asp:ScriptManager ID="ScriptManager2" runat="server">
            <Scripts>
            <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
            </Scripts>
        </asp:ScriptManager>
       
        <!-- DIV for Grid master --> 
        <div id="dvScroll"; style="width:450px; height:300px; overflow:scroll; float:left">        
            <!-- UpdatePanel for UpdatePostback -->
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <!-- Grid Master -->
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CellPadding="4" OnRowCreated="GridView1_RowCreated" OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                        <Columns>
                          <asp:BoundField DataField="ID_NAVE" HeaderText="IdNave" ItemStyle-Width="50" ItemStyle-wrap="false" Visible="true" />
                            <asp:BoundField DataField="NOMENAVE" HeaderText="nave" ItemStyle-Width="15" ItemStyle-wrap="false" Visible="true" />
                        </Columns>
                    </asp:GridView>               
                </ContentTemplate>  
            </asp:UpdatePanel>
        </div>


for other GrdiView , is the same


<pre> <div style="width:450px; float:left; height:300px; overflow:scroll;">       
            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                <ContentTemplate>
                    <asp:GridView ID="GridRest" runat="server" AutoGenerateColumns="false" CellPadding="4" OnRowCreated="GridRest_RowCreated" OnRowDataBound="GridRest_RowDataBound" OnSelectedIndexChanged="GridRest_SelectedIndexChanged">
                        <Columns>
                            <asp:BoundField DataField="id_restaurant" HeaderText="IdRst" ItemStyle-Width="50" ItemStyle-wrap="false" Visible="true" />
                            <asp:BoundField DataField="restaurantname" HeaderText="Restaurant" ItemStyle-Width="15" ItemStyle-wrap="false" Visible="true" />
                            <asp:BoundField DataField="suite" HeaderText="Suite" ItemStyle-Width="100" ItemStyle-wrap="false" Visible="true" />
                        </Columns>
                        <HeaderStyle BackColor="gray" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                </ContentTemplate>
            </asp:UpdatePanel>
       </div>

QuestionProblem consuming soap web service - content mismatch Pin
anto200515-Dec-17 5:42
Memberanto200515-Dec-17 5:42 
AnswerRe: Problem consuming soap web service - content mismatch Pin
Richard Deeming18-Dec-17 2:40
mveRichard Deeming18-Dec-17 2:40 
GeneralRe: Problem consuming soap web service - content mismatch Pin
anto200518-Dec-17 5:44
Memberanto200518-Dec-17 5:44 
GeneralRe: Problem consuming soap web service - content mismatch Pin
Richard Deeming18-Dec-17 6:34
mveRichard Deeming18-Dec-17 6:34 
QuestionHow to fix error "the type or namespace name 'CustomerBAL' could not be found (are you missing a using directive or an assembly reference) Pin
Member 1357490013-Dec-17 21:50
MemberMember 1357490013-Dec-17 21:50 
AnswerRe: How to fix error "the type or namespace name 'CustomerBAL' could not be found (are you missing a using directive or an assembly reference) Pin
pt140113-Dec-17 22:00
Memberpt140113-Dec-17 22:00 
GeneralRe: How to fix error "the type or namespace name 'CustomerBAL' could not be found (are you missing a using directive or an assembly reference) Pin
Member 1357490013-Dec-17 22:56
MemberMember 1357490013-Dec-17 22:56 
QuestionHow to incorporate pagination feature into my repository Pin
Mou_kol13-Dec-17 3:31
MemberMou_kol13-Dec-17 3:31 
AnswerRe: How to incorporate pagination feature into my repository Pin
Richard Deeming13-Dec-17 7:17
mveRichard Deeming13-Dec-17 7:17 
GeneralRe: How to incorporate pagination feature into my repository Pin
Mou_kol14-Dec-17 20:33
MemberMou_kol14-Dec-17 20:33 
GeneralRe: How to incorporate pagination feature into my repository Pin
F-ES Sitecore14-Dec-17 22:56
mveF-ES Sitecore14-Dec-17 22:56 
GeneralRe: How to incorporate pagination feature into my repository Pin
Richard Deeming18-Dec-17 1:47
mveRichard Deeming18-Dec-17 1:47 
GeneralRe: How to incorporate pagination feature into my repository Pin
Mou_kol18-Dec-17 20:49
MemberMou_kol18-Dec-17 20:49 
GeneralRe: How to incorporate pagination feature into my repository Pin
Richard Deeming19-Dec-17 1:59
mveRichard Deeming19-Dec-17 1:59 
QuestionAm I approaching this problem the wrong way? Pin
samflex11-Dec-17 5:25
Membersamflex11-Dec-17 5:25 
AnswerRe: Am I approaching this problem the wrong way? Pin
jkirkerx13-Dec-17 9:53
professionaljkirkerx13-Dec-17 9:53 
QuestionHow to setup and use VSTS for five user Pin
Mou_kol7-Dec-17 23:19
MemberMou_kol7-Dec-17 23:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.