.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Button in accordionPane won't fire Accordion1_itemCommand

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net

Hi guys,

i'm trying to update the data from the textbox using the update button at one of my accordionPane. but when i click the button it won't go to the Accordion1_itemcommand..... can someone please teach me how to fix my problem??below are code

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="custEditParticular.aspx.vb" Inherits="ProrsumTestK.custEditParticular" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
     <link href="StyleSheet1.css" rel="stylesheet" type="text/css" />
    <form id="form1" runat="server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ProrsumDBConnectionString %>" 
        SelectCommand="SELECT * FROM [Customer]"></asp:SqlDataSource>
    <asp:ToolkitScriptManager ID="To

View Complete Post

More Related Resource Links

DataGrid Button + event in Footer, event not getting fire!

hi.First Time i am trying this...I have one Datagrid with Footer. Footer Row Contains Input fields with one Button to add New Values. I have button click event but not getting fires. my code follows:protected void dgPrice_ItemCreated(object sender, DataGridItemEventArgs e)    {            Button btnAdd = new Button();            btnAdd.Text = "Add";            btnAdd.Width = 80;            btnAdd.ID = "btnAdd";           // btnAdd.Attributes.Add("onClick", "return validateRates()");            btnAdd.CommandName = "add";            btnAdd.CommandArgument = e.Item.ItemIndex.ToString();            btnAdd.Command +=new CommandEventHandler (PriceNew);            e.Item.Cells[6].Controls.Add(btnAdd);}protected void PriceNew(object sender, EventArgs e)    {}btnAdd.command/ btnAdd.click event not getting fired I also tried to

FormView: Button requires 2 click to fire the event



I have a modal formview with insertitemtemplate.
I have to click the insert button twice to fire the event.

But if I do not insert any values, only one click is required and the validationgroup fires.
But if I enter all valid values, I need to click twice and the event does not fire during the
first click. But I need CausesValidation = false because to required field validators.

How to avoid two clicks to fire the event if the formview is valid

Any input on how to handle this is greatly appreciated.


 protected void FormViewInsertApplication_ItemCommand(object sender, FormViewCommandEventArgs e)
        if (e.CommandName == "InsertApp")
            // Must explicitly cause validation because update button causevalidation is set to false   
            if (!Page.IsValid)
             if (!doValidate()) { return; }

<asp:FormView id="FormViewInsertApplication">
       <asp:Button ID="btnInsert" runat="server" Text="Insert" CommandName="InsertApp"   	   		                         

Button posts back but doesn't fire event Only in IIS - Fine in Cassini


Here's an odd one that I've never seen before.

Only on IIS, not in Cassini but in all web browsers I have a button that posts back and the page_load event fires, but the actual button click event doesn't fire.

there is no re-writing of the page or anything else happening.


Button.Click doesn't fire


In my default Page I register this listener:

protected override void OnInit(EventArgs e)


                               Button1.EnableViewState = true;

                               Button1.Click += new EventHandler(this.Button1_Click);                           




and this Event is never fired

protected void Button1_Click(object sender, EventArgs e)


                               string text = TextBox1.Text;


Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

Problem with Dynamic Button


Hi friends,

I am trying to make a page inspired from http://login.qlikview.com/help.aspx

here I have made a dropdownlist and on clicking I am able to dynamically add the textboxes and radio buttons using placeholders. My problem is I am not able to use a dynamic number of submit buttons. In the page (link above) I need to make the submit button available for two choices and invisible for one.  But the option dynamicbutton is not available alike dynamicTextboxes etc. What could I do? Is there any other way I could figure out to implement this.

Thanking you in advance,


replacing ok and cancel button of an alert message with YES an NO button in asp.net web application.


i want to replace ok and cancel button of an alert message with YES an NO button in asp.net web application.When a user will click yes the data will be saved in the database and if user clicks that will act as a reset button and do not save the data in database and the control will move with as usual to the redirect page.Any pointers will be highly appreciated.I am usin g C# language.

Run Button Behavior: Suggestion/Bug


Note: This could be a bug or considered as suggestion. I am not looking for solution.

1: I have ImageWatermark.cshtml open and currently in focus.

2: I have Photo1.jpg selected in left Files workspace.

3: Now if I Click "Run", instead of opening ImageWatermark.cshtml it trys to open Photo1.jpg and it fails.

So ideally I would expect the "open file (ImageWatermark.cshtml) to run rather than running the selection from Workspace.

Button specific code


I have 2 submit buttons on my page. Right now, the only way to run the code behind with razor is to to If(IsPost). Since I have 2 buttons, how would I destinguish between the two in post? Is there a way to request a button that sent a post request?  

Ho to fire the Application Error in asax from the code?


 Hi All,

I have this code in Global.asax but it not firing once an error occured:


void Application_Error(object sender, EventArgs e)



        // Get the error details

        HttpException lastErrorWrapper = Server.GetLastError() as HttpException;

        Exception lastError = lastErrorWrapper;

        if (lastErrorWrapper.InnerException != null)

        lastError = lastErrorWrapper.InnerException;



        string lastErrorTypeName = lastError.GetType().ToString();

        string lastErrorMessage = lastError.Message;

        string lastErrorStackTrace = lastError.StackTrace;



Please help me so I can call this method from any page?

Thaxxxxxxxxxxxxx a lot,



Html Link Button


Hi All,

I would like to create a html link button(in aspx page) so that the page could not post back and some controls to display on clicking link button.

Can any one of you help me regarding this issue?

Let me know if you have any queries.



Change Button Text in Multi Language Website


Hi i developing multi language website

using Master pages

everything fine

Page_Load i set the Text property of Button Control from Resource file

like this

Button1.Text = GetLocalResourceObject("Button1")

then in the button click event i cnage the text of the Button control

Button1.Text = GetLocalResourceObject("Button1_new")

but the text doesn't change and no error messgae

what is the problem how to solve this


Can't read global resource in asp button


I have translated Text Ok in arabic and I have that placed in global Navig.resx file

<asp:Button ID

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend