Click here to Skip to main content
15,889,281 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Radiobutton not fire an event.. Pin
Prasad Vj1-Feb-14 21:50
professionalPrasad Vj1-Feb-14 21:50 
QuestionASP.NET MVC Pin
woopsydoozy31-Jan-14 4:59
woopsydoozy31-Jan-14 4:59 
AnswerRe: ASP.NET MVC Pin
thatraja2-Feb-14 21:20
professionalthatraja2-Feb-14 21:20 
QuestionAJAX/Web Services and GET vs. POST Pin
littleGreenDude30-Jan-14 10:03
littleGreenDude30-Jan-14 10:03 
AnswerRe: AJAX/Web Services and GET vs. POST Pin
Gopi Kishan Mariyala31-Jan-14 0:27
Gopi Kishan Mariyala31-Jan-14 0:27 
GeneralRe: AJAX/Web Services and GET vs. POST Pin
littleGreenDude31-Jan-14 1:47
littleGreenDude31-Jan-14 1:47 
GeneralRe: AJAX/Web Services and GET vs. POST Pin
Gopi Kishan Mariyala31-Jan-14 1:50
Gopi Kishan Mariyala31-Jan-14 1:50 
QuestionLoading ascx control Using C# code Pin
Saeed Ansarinejad30-Jan-14 6:48
Saeed Ansarinejad30-Jan-14 6:48 
im having some troubles in firing imagebutton click event in a user control which is loaded when the combo selectedIndexChanged event fires...

the user control is this

ASP.NET
<div id="rowsBg" class="rowsBgSearchStaff" runat="server">
    <div id="trashHolder" class="buttonHolder">
        <asp:ImageButton ID="btnTrash" CssClass="btnTrashSearch" ToolTip="حذف" 
            ImageUrl="~/img/btnsearchtrash.png" runat="server" onclick="btnTrash_Click" />
    </div>
    <div id="separator1" class="separatorSearchStaff">
    </div>
    <div id="editHolder" class="buttonHolder">
        <asp:ImageButton ID="btnEdit" CssClass="btnEditSearch" ToolTip="ویرایش" 
            ImageUrl="~/img/btnsearchedit.png" runat="server" 
            onclick="btnEdit_Click" />
    </div>    
    <div id="separator2" class="separatorSearchStaff">
    </div>
    <div id="infoStaffHolder" class="staffinfoHolder">
        <asp:Label ID="lblStaffInfo" runat="server">Name, Family, Code</asp:Label>
    </div>                        	
</div>



and these are events:

C#
protected void btnTrash_Click(object sender, ImageClickEventArgs e)
{
    dbm.Execute(String.Format("delete from Staff where Code='{0}'", StaffCode));
    dbm.Execute(String.Format("delete from Contract where StaffCode='{0}'", StaffCode));
    dbm.Execute(String.Format("delete from WardStaffs where StaffCode ='{0}'", StaffCode));
    rowsBg.Visible = false;
}
protected void btnEdit_Click(object sender, ImageClickEventArgs e)
{
    Response.Redirect(String.Format("EditStaff.aspx?sid={0}", StaffCode));
}


TIP: dbm is an instance of my databasemanager class Smile | :)

in my aspx page I use below codes to add control manually

C#
protected void cmbBxWard_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
    if (dbm.Read(String.Format("select * From Staff where Staff.Code in (select StaffCode from WardStaffs where WardCode={0})", cmbBxWard.Items[cmbBxWard.SelectedIndex].Value)))
    {
        foreach (DataRow dr in dbm.DT.Rows)
        {
            Control cnt = Page.LoadControl("StaffItem.ascx");
            StaffItem staff = (StaffItem)cnt;
            staff.StaffCode = dr["Code"].ToString();
            itemHolder.Controls.Add(staff);
        }
    }
}


itemHolder is my div tag which hast runat="server" attribute
StaffItem is my control
after I change the selected item in my combobox I will click the btnEdit of my control
but it does not fire Frown | :( Mad | :mad:

why? Confused | :confused: Confused | :confused:

help me please Unsure | :~
Do not Judge me...
I'm Persian!

Questionhow to download xlsx file from sftp & convet into datatable Pin
antony beula30-Jan-14 1:04
antony beula30-Jan-14 1:04 
AnswerRe: how to download xlsx file from sftp & convet into datatable Pin
Richard Deeming30-Jan-14 2:10
mveRichard Deeming30-Jan-14 2:10 
Questionupdate a row in gridview when checkbox is checking (using button) Pin
Member 1036798129-Jan-14 12:12
Member 1036798129-Jan-14 12:12 
AnswerRe: update a row in gridview when checkbox is checking (using button) Pin
Member 1036798129-Jan-14 12:17
Member 1036798129-Jan-14 12:17 
AnswerRe: update a row in gridview when checkbox is checking (using button) Pin
Richard Andrew x6429-Jan-14 14:07
professionalRichard Andrew x6429-Jan-14 14:07 
AnswerRe: update a row in gridview when checkbox is checking (using button) Pin
vishal.gavle29-Jan-14 20:29
vishal.gavle29-Jan-14 20:29 
QuestionMove items between 2 asp listbox with SQL Data Source and double click event Pin
Member 775837529-Jan-14 5:16
Member 775837529-Jan-14 5:16 
AnswerRe: Move items between 2 asp listbox with SQL Data Source and double click event Pin
Kornfeld Eliyahu Peter29-Jan-14 6:19
professionalKornfeld Eliyahu Peter29-Jan-14 6:19 
AnswerRe: Move items between 2 asp listbox with SQL Data Source and double click event Pin
Prasad Vj2-Feb-14 1:47
professionalPrasad Vj2-Feb-14 1:47 
Questionuser role - web api Pin
miss78629-Jan-14 5:03
miss78629-Jan-14 5:03 
AnswerRe: user role - web api Pin
Deflinek30-Jan-14 0:24
Deflinek30-Jan-14 0:24 
GeneralRe: user role - web api Pin
miss78630-Jan-14 0:43
miss78630-Jan-14 0:43 
GeneralRe: user role - web api Pin
Deflinek30-Jan-14 2:27
Deflinek30-Jan-14 2:27 
GeneralRe: user role - web api Pin
miss78631-Jan-14 0:28
miss78631-Jan-14 0:28 
GeneralRe: user role - web api Pin
Deflinek31-Jan-14 2:19
Deflinek31-Jan-14 2:19 
QuestionIs it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
H.A.Baig28-Jan-14 18:53
H.A.Baig28-Jan-14 18:53 
AnswerRe: Is it good to use Windows Service to schedule any operation on server side in ASP.Net MVC Pin
Deflinek29-Jan-14 0:07
Deflinek29-Jan-14 0:07 

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.