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


Post New Web Links

how to call dropdown SelectedIndexChanged event in page load event in c#

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net
 

Hi everyone,

in my web form i have a department dropdown box, in its selectedIndexChanged event i have to fill the equipment dropdown box and in equiment dropdown selectedIndexChanged i have to fill out the other textboxs.

the depratment dropdown box get its value from sqldatasource.

 <asp:DropDownList ID="dp_deptname" runat="server" DataSourceID="SqlDataSource1" DataTe


View Complete Post


More Related Resource Links

How to avoid viewstate in page load event??

  
Hello Everyone, Here Is my scenario,I haveMaster Page -> ASPX page -> User ControlUser control page is contains all dynamic bind controls (e.g Repeater) depended on ASPX Page (Only one parameter say ItemNo) The problem is, if I bound user control on page load event with passing respective parameters then it's create to much view state (I checked source file and it's almost 1.5 MB) In other way if I put one textbox, and a command button and I pass required parameter on button click and load the control then page size is ok (I checked and it's  < 500KB) So is it any way I can reduce my page/state size??

show asp.net modal popup on page load event?

  
 hi,   I have placed an asp.net modal popup extender on my page. it works fine when a button is target controlId but I want to show it when user enters page. so I put the below in the page load event but nothing happens (ie6) pnlModal_ModalPopupExtender.Show(); Is this the right way?   thanks  

how to call a event another page & refresh other page jquery

  
!) i have two page a with event   Bu_DocSearch_Click (object sender, System.EventArgs e)  i require it call another page and reftesh automatically protected void Bu_DocSearch_Click (object sender, System.EventArgs e){            //+" order by a.ID";            string sql="";            string S_SubjectContain=CCUtility.ToSQL((Utility.GetParam("txt_SubjectContain")+"%"),FieldTypes.Text);;            string Find=" and a.Subject Like "+S_SubjectContain;            //string Find=" and a.Subject ='"+S_SubjectContain+"%'";                                ArrayList SelectedChkBox =new ArrayList();                SelectedChkBox =Utility.CheckboxSelected(CheckBoxBind);                    string Inclause="";            for(int i=0;i<SelectedChkBox.Count;i++){ 

Web form page load event

  

I have  Web page that uses LinkButton control inside Template Fields of Gridview.

I am trying to work on LinkButton Click event and trying to preserve the Value of LinkButton that user click, and based on that value, i want to refresh tha page data.

I used CommandName and CommandArgument property of Linkbutton, but i can use that property only in GridView_RowCommand method by checking e.CommandName expression. But the problem with that Gridview_RowCommand event fire after all other page_load activity. So the value never used in the page_load event to refresh the data in all other control.

I also tried to use OnClick Method, Session variable and Hidden variable. but when i run Response.Redirect method from Gridview_RowCommand, it clear all the Session and Hidden variable values. also tried (Response.Redirect(,false)) method but never got success.

Any suggestion will be appricated in advance.


how to call button click event of ascx page in the button click event of aspx page

  

hi,

i'm using user control in my page.i need to call the button click event of user control in the button click event of aspx page based on some condition.is it possible?can any one help me?


createchildcontrols is not fired on page load event

  

hello frnds

i have develop a custom control as shown below

public class MyControl : System.Web.UI.WebControls.WebControl, INamingContainer

{

private TextBox txtData ;

protected override void CreateChildControls()
{
txtData = new TextBox();
txtData.ID = "txtName";


}

}



Now, i have placed this control on web page. i also have other asp.net controls like combobox, checkbox etc on this same web page as displayed below. 


<%@ Page Title="" Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true" CodeFile="Customer.aspx.cs" Inherits="Customer" EnableViewState="true" %>

<asp:Content ID="Content2" ContentPlaceHolderID="PageContent" runat="Server">
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
           <td><asp:MyControl ID="CmbMyControl" runat="Server" /></td>
        <tr>
    </table>
</asp:Content>




Now in page load ev

displaying 2 alternating db records with each new page load event

  

I have a webpage which displays content drawn from a single record in a database table. I've been asked to change this so that the content displayed alternates between 2 records each time the page is requested by a browser (I guess this would equate to each PageLoad event).

The records to be displayed are chosen on the basis of two dates, a beginning date and and ending date, that define a time period in which the record is to be active. The table containing these records has 2 columns containing these dates (begin date is contained in "dtDisplay" and end date is "lastDisplay."

I'm not sure how to amend the existing code behind to make this happen. Here is the c# that I inherited from a developer who is no longer available. Thanks for any help:

private void getfeatured_properties()
        {
           string today = DateTime.Now.Date.ToString();

           SqlCommand cmd = common.openDatabase();
           if (cmd.Connection.State == ConnectionState.Open)
           {
              try
              {
                 string sql = "select propID from featured_properties where " +
                    "dtDisplay <= '" + today + "' and " +
                    "lastDisplay >= '" + today + "'";
           

Checking Some Values In A CheckBoxList In The Page Load Event.

  

Hello forum,

I have a checkboxlist (cblTeamMates) with a sqldatasource (sqlTeamMates) that has 3 columns (ID, FullName and Status ).  The datavaluefield and datatextfield for cblTeamMates is "FullName" and the 2 status values possible are "Available" and "Absent".  How do I go about, in the page load event,  checking all  the names (FullName) whose Status is "Available"?

Thank you.


disable button in page load click event using javascript

  

Hi,

i have button its  enable false in aspx page, if i click the page load  click event  then button should enable

looking forward the reply.



Page Load event is not Firing while click on Back Button of Internet

  

Hi All

I am also facing some issues with Back Button of Internet Browser as well.

Actully Page Load event of my page is not firing when i click on Back Button of Internet.

Please suggest !!!!!!!!

Thanks in advance.


Categories: 
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