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

ASP.NET

 
GeneralRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Lay_Kay21-Dec-17 17:50
MemberLay_Kay21-Dec-17 17:50 
SuggestionRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Richard Deeming22-Dec-17 2:08
mveRichard Deeming22-Dec-17 2:08 
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 
I find many discussions, but none work with more div

<pre><script type="text/javascript"> 
    window.onload = function scr1() {
        var div = document.getElementById("dvScroll");
        var div_position = document.getElementById("div_position");
        var position = parseInt('<%=!string.IsNullOrEmpty(Request.Form["div_position"]) ? Request.Form["div_position"] : "0" %>');
            div.scrollTop = position;
            div.onscroll = function () {
                document.getElementById("div_position").value = div.scrollTop;
            };
    };
</script>



<pre> <form id="form1" runat="server">
        <div id="dvScroll"; style="width:450px; height:300px; overflow:scroll; float:left">
            <asp:HiddenField ID="HiddenField1" runat="server" />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" OnRowDataBound="GridView1_RowDataBound" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" CellPadding="4">
              <Columns>         
                <asp:BoundField DataField="ID_NAVE" HeaderText="IdNave" ItemStyle-Width="50" ItemStyle-wrap="false" Visible="true" />
                ....
              </Columns>
            </asp:GridView>
        </div>
        <input type="hidden" id="div_position" name="div_position" />



the DIV dvscroll with the HiddenField

<pre><form id="form1" runat="server">
        <div id="dvScroll"; style="width:450px; height:300px; overflow:scroll; float:left">
            <asp:HiddenField ID="HiddenField1" runat="server" />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" OnRowDataBound="GridView1_RowDataBound" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" CellPadding="4">
              <Columns>         
                <asp:BoundField DataField="ID_NAVE" HeaderText="IdNave" ItemStyle-Width="50" ItemStyle-wrap="false" Visible="true" />
                ....
              </Columns>
            </asp:GridView>
        </div>
        <input type="hidden" id="div_position" name="div_position" />

       <div id="dvScroll2"; style="clear:both; width:600px; height:300px; overflow:scroll;">       
           <asp:HiddenField ID="HiddenField2" runat="server" />
           <asp:GridView ID="GridMnuRest" runat="server" AutoGenerateColumns="false" CellPadding="4" OnRowCreated="GridMnuRest_RowCreated" OnRowDataBound="GridMnuRest_RowDataBound" OnSelectedIndexChanged="GridMnuRest_SelectedIndexChanged" OnSelectedIndexChanging="GridMnuRest_SelectedIndexChanging" OnRowCommand="GridMnuRest_RowCommand">                            
               <Columns>       
                <asp:TemplateField >
                  <ItemTemplate>
                    <asp:CheckBox ID="MnuSelect" runat="server" AutoPostBack="true" OnCheckedChanged="GridMnuRest_OnCheckedChanged" />
                  </ItemTemplate>
                </asp:TemplateField>                  
               <asp:BoundField DataField="id_ristorante" HeaderText="IdRst" ItemStyle-Width="20" ItemStyle-wrap="false" Visible="true" />
              </Columns>
           </asp:GridView>
       </div>
       <input type="hidden" id="div_position2" name="div_position2" />
    </form>


as you can do for 2 or more DIV ?
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 
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 

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.