Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8411809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:31:07+00:00 2026-06-10T00:31:07+00:00

basically i have a form with the runat server tag. within this form i

  • 0

basically i have a form with the runat server tag. within this form i have an asp repeater and asubmit button- but i also want to have a button which will call a c# method in my code – can someone please give me an idea as to how to go about this? Also in this code the selectindexchanged event does not fire even though its autopostback value is true which is weird :/

thanks

Edit
OK solution seems to be remove the action tab and i have then set the property through some JavaScript instead 🙂 why cant things be straightforward


    <form action="broadcast.aspx" id="bcForm" runat="server" onsubmit="chkChecks()"> 
            <a class="btn btn-warning" href="#" title="Create new product"> <i class="icon-plus icon-white"></i> Create new product</a> &nbsp &nbsp <a id="bcItems" data-toggle="modal" class="btn btn-primary" title="Broadcast" onclick="chkItems()"><i class="icon-share icon-white"></i> Broadcast</a>

</br></br>
<p>Filters:
<asp:DropDownList ID="groupFilter" runat="server" ToolTip="Groups"        AutoPostBack="True" onselectedindexchanged="groupFilter_SelectedIndexChanged1" ></asp:DropDownList></p>


   <div>
        <asp:Repeater ID="DepartmentList" runat="server"  OnItemmDataBound="DepartmentsList_ItemDataBound">
   <HeaderTemplate>
         <table id="grouptable" class="table table-bordered table-striped sortable"> 
                    <thead>
                            <tr>
                            <th class="sorttable_nosort" >Broadcast 
                                <br> </br><a class="label label-inverse" onclick="checkAll()">Check All</a>&nbsp<a class="label label-inverse" onclick="uncheckAll()">Uncheck All</a></th>
                            <th class="sorttable_numeric">ID</th>
                            <th>Name</th>
                            <th>Last Modified</th>
                            <th>Actions</th>
                        </tr>
                        </thead>
                        <tbody>
                </HeaderTemplate>
                <ItemTemplate>
                            <tr>
                            <td WIDTH="100">
                            <input type="checkbox" name="BroadcastSelect[]" value="<%# Eval("DEPT_ID") %>"</input></td>
                            <td>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("DEPT_ID") %>'></asp:Label></td>
                            <td><%# Eval("DESC") %></td>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("CHG_DATE") %>'></asp:Label></td>
                            <td><a class="btn btn-info" href="<%# Eval("gURL") %>">Edit</a>&nbsp;&nbsp<asp:HyperLink ID="HyperLink1" runat="server" CssClass="btn btn-danger">Broadcast Now</asp:HyperLink></td>
                            </tr>
                </ItemTemplate>
                <FooterTemplate>
                            </tbody>
                    </table>
                </FooterTemplate>
                </asp:Repeater>
                </div>



              <div id="myModal" class="modal hide fade" runat="server">
                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal">&times; Select A Branch</h3>
                </div>
                <div class="modal-body">
                  <h4>Test</h4>

                <asp:Repeater ID="cfgList" runat="server">
                    <HeaderTemplate>
                   <table id="configtable" class="table table-bordered table-striped"> 
                    <thead>
                            <tr>
                            <th>Broadcast</th>
                            <th>Branch No.</th>
                            <th>Branch Name</th>
                        </tr>
                        </thead>
                        <tbody>
                </HeaderTemplate>
                <ItemTemplate>
                            <tr>
                            <td>
                            <input type="checkbox" name="BranchSelection[]" value="<%# Eval("branch") %>"</input></td>
                            <td><%# Eval("branch") %></td>
                            <td><%# Eval("name") %></a> </td>
                            </tr>
                </ItemTemplate>
                <FooterTemplate>
                            </tbody>
                    </table>
                </FooterTemplate>
                </asp:Repeater>


                </div>

                <div class="modal-footer">
                  <!--<a class="btn btn-success" onclick="document.getElementById('bcForm').submit()" title="Broadcast"><i class="icon-share icon-white"></i> Broadcast</a> -->
                  <a class="btn btn-success" onclick="chkBranches()" title="Broadcast"><i class="icon-share icon-white"></i> Broadcast</a>
                  <!--<input type="submit" value="Broadcast3" class="btn btn-success"/> -->
                  <div id="myDiv"></div>
                </div>
              </div>
              <!-- <a data-toggle="modal" href="#myModal" class="btn btn-primary">Broadcast Testing</a> -->
                <!--<a class="btn btn-success" onclick="document.getElementById('bcForm').submit()" title="Broadcast"><i class="icon-share icon-white"></i> Broadcast</a>-->
                <a id="bcItems2" data-toggle="modal" class="btn btn-primary" title="Broadcast" onclick="chkItems()"><i class="icon-share icon-white"></i> Broadcast</a>
                <ul class="pager">
                <li>
                <asp:Button ID="previousBtn" runat="server" Text="Prev" cssclass="search-query" 
                        Width="80px"/>
                </li>
                <li>
                <asp:Button ID="nextBtn" runat="server" Text="Next" cssclass="search-query" 
                        Width="80px"/>
                </li>
                </ul>
                </form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:31:08+00:00Added an answer on June 10, 2026 at 12:31 am

    remove the action attribute first from the form. – DotNet Dreamer

    this was basically the answer, check the original post which i have updated with the fix 🙂

    props to DotNet Dreamer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this form. Basically what I want is to send a auto-response with
hopefully will explain this right! Ok, Basically I have a form within my sitecore
I have an asp.net button: <asp:Button ID=MainContent_ibSave runat=server Text=Save /> </td> I need to
Basically i have a form where a studentID is inputted, i then want to
I have a user control which contains the following code: <form id=CurrencyForm method=post runat=server>
I have an ASP.NET page that is basically a search form. My code for
I'm new to this site, and basically I have created a Windows Form using
Basically I have a form that goes full screen automatically. But while Inet runs,
Basically I have a windows form C# program that uses a SQL Server Express
I'm a beginner at this. Basically I have a form that has the correct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.