Thursday, June 7, 2012

ASP.NET Dropdown box event fire

Normally Dropdown box is not fire event. to fire any event of dropdown box you need to write the AutoPostBack="True" property in dropdown control.

ASPX File:

  <asp:DropDownList ID="regionWingDropDownList" runat="server" Height="30px" Width="217px"  
           DataValueField="WingId" DataTextField="WingName" AutoPostBack="True"  
           style="margin-top: 0px"   

 protected void regionWingDropDownList_SelectedIndexChanged(object sender, EventArgs e)  
       Wing wing = new Wing();  
       wing.WingId = Convert.ToInt32(regionWingDropDownList.SelectedItem.Value);  
       regionDivisionDropDownList.DataSource = _regionManagerObj.GetSelectedWingAllDiviSionName(wing);  

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...