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 328393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:29:28+00:00 2026-05-12T09:29:28+00:00

I have copied the controls and decorations from one content page to another, as

  • 0

I have copied the controls and decorations from one content page to another, as they are almost similar.

But the following problems are happening:

(1) Button events are not firing.

(2) One page is loaded multiple times.

(3) Some AJAX buttons are not visible.

Can any one tell me why is this happening?

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="StudentControlPanel.aspx.cs" Inherits="Student_StudentControlPanel" Title="Untitled Page" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="#C00000" Text="Label"
        Width="318px"></asp:Label><br />
    <ext:button id="btnLogOut" runat="server" autopostback="True" onclick="btnLogOut_Click"
        text="Log Out"></ext:button>
    <table>
        <tr>
            <td style="width: 3px">
    <table>
        <tr>
            <td colspan="5">
                <strong><span>Student Control Panel</span></strong></td>
        </tr>
        <tr>
            <td align="right">
                Username :</td>
            <td colspan="2">
                <asp:Label ID="labUsername" runat="server" Text="Label"></asp:Label></td>
            <td colspan="1" align="right">
                Roll No. :</td>
            <td colspan="1">
                <asp:Label ID="labRollNo" runat="server" Text="Label"></asp:Label></td>
        </tr>
        <tr>
            <td align="right">
                Student Name :</td>
            <td colspan="2">
                <asp:Label ID="labName" runat="server" Text="Label"></asp:Label></td>
            <td colspan="1" align="right">
                Reg No. :</td>
            <td colspan="1">
                <asp:Label ID="labRegNo" runat="server" Text="Label"></asp:Label></td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td colspan="2">
            </td>
            <td colspan="1" align="right">
                Department :</td>
            <td colspan="1">
                <asp:Label ID="labDepartment" runat="server" Text="Label"></asp:Label></td>
        </tr>
        <tr>
            <td align="right">
            </td>
            <td colspan="2">
            </td>
            <td colspan="1">
            </td>
            <td colspan="1">
            </td>
        </tr>
        <tr>
            <td align="right" style="height: 21px">
            </td>
            <td colspan="2" style="height: 21px">
            </td>
            <td colspan="1" style="height: 21px">
            </td>
            <td colspan="1" style="height: 21px">
            </td>
        </tr>
    </table>
            </td>
            <td colspan="2" valign="top"><table>
                    <tr>
                        <td colspan="3">
                            <strong>Mails</strong></td>
                    </tr>
                    <tr>
                        <td colspan="3" style="text-align: center">
                            <asp:Button ID="btnMail" runat="server" Height="24px" Text="Send Mail" Width="82px" OnClick="btnMail_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <asp:Button ID="btnOldMails" runat="server" Text="Old Mails" OnClick="btnOldMails_Click" /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <br />
    &nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="NoticeObjectDataSource" OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
        <Columns>
            <asp:CommandField HeaderText="View Notice" ShowSelectButton="True" />
            <asp:BoundField DataField="NoticeCode" HeaderText="NoticeCode" SortExpression="NoticeCode" />
            <asp:BoundField DataField="HangingDate" HeaderText="HangingDate" SortExpression="HangingDate" />
            <asp:BoundField DataField="TeacherCode" HeaderText="TeacherCode" SortExpression="TeacherCode" />
            <asp:BoundField DataField="TargetSessionCode" HeaderText="TargetSessionCode" SortExpression="TargetSessionCode" />
            <asp:BoundField DataField="CourseCode" HeaderText="CourseCode" SortExpression="CourseCode" />
            <asp:BoundField DataField="NoticeSubject" HeaderText="NoticeSubject" SortExpression="NoticeSubject" />
            <asp:BoundField DataField="NoticeContent" HeaderText="NoticeContent" SortExpression="NoticeContent" />
            <asp:BoundField DataField="ExpiryDate" HeaderText="ExpiryDate" SortExpression="ExpiryDate" />
            <asp:CheckBoxField DataField="IsExpired" HeaderText="IsExpired" SortExpression="IsExpired" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource 
        ID="NoticeObjectDataSource" 
        runat="server" 
        SelectMethod="GetNoticesBySessionCode"
        TypeName="Ice_Web_Portal.BO.Notice" OnSelecting="NoticeObjectDataSource_Selecting">
        <SelectParameters>
            <asp:Parameter Name="sessionCode" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br />
    <ext:scriptmanager id="ScriptManager1" runat="server" theme="Slate"></ext:scriptmanager>
</asp:Content>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;



public partial class Student_StudentControlPanel : System.Web.UI.Page
{
    string sessionCode = string.Empty;
    string username = string.Empty;

    protected void Page_Load(object sender, EventArgs e)
    {
        username = (string)Request.QueryString["username"];

        Student std = Student.GetStudentByUsername(username);

        if (std != null)
        {
            labName.Text = std.StudentName;
            labUsername.Text = username;
            labRollNo.Text = std.RollNo;
            labRegNo.Text = std.RegNo;

            Dept dpt = std.Department;

            if (dpt != null)
            {
                labDepartment.Text = dpt.DeptName;
            }
            else
            {
                labDepartment.Text = "?";
            }

            sessionCode = std.SessionCode;
        }
    }

    protected void NoticeObjectDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        e.InputParameters["SessionCode"] = sessionCode;
    }

    protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
        int rowIndex = e.NewSelectedIndex;

        string noticeCode = GridView1.Rows[rowIndex].Cells[1].Text;
        string username = this.labUsername.Text;

        Server.Transfer(@"~/Student/ViewNoticeDetails.aspx?NoticeCode=" + noticeCode + "&username=" + username);
    }

    protected void btnMail_Click(object sender, EventArgs e)
    {
        try
        {
            Server.Transfer(@"~/Student/StudentSendMail.aspx?username=" + username);
            //Response.Redirect(@"~/Student/StudentSendMail.aspx?username=" + username);
        }
        catch (Exception ex)
        {
            string m;
        }
    }
    protected void btnOldMails_Click(object sender, EventArgs e)
    {
        try
        {
            Server.Transfer(@"~/Student/StudentOldMail.aspx?username=" + username);
            //Response.Redirect(@"~/Student/StudentSendMail.aspx?username=" + username);
        }
        catch (Exception ex)
        {
            string m;
        }
    }

    protected void btnLogOut_Click(object sender, EventArgs e)
    {
        AspNetUtil util = new AspNetUtil(this.Page);
        util.DisposeCookie("user");

        Server.Transfer("~/Default.aspx");
    }
}
  • 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-05-12T09:29:28+00:00Added an answer on May 12, 2026 at 9:29 am

    If you’re using Visual Studio, it’s possible that the controls were not registered w/the .designer.cs file. Check to make sure they’re all there.

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

Sidebar

Related Questions

I have copied some files from project A to project B, both of which
I have copied zipped file from the playframework.org website and unzipped it at a
I have copied a project from my old XP machine to my new Win7
I am following the django tutorial here . I have copied everything exactly. After
I'm wondering how I can go about accessing page controls from a separate class
I have this code copied from C# 4.0 in a nutshell that uses Attribute/Reflection
HI,I have a VS project which I have copied to my new machine from
I have a php page that uses CURL to log in to another page,
When I have just one <%@Register %> line in my page, it loads fine.
I have an iPad app with several segmented controls, including one view with two

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.