Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a dropdown list campus as head office,campus1,campus2

<label for="textfield" class="control-label">Campus</label>

<asp:DropDownList ID="ddBranch" CssClass="input-large" runat="server"
>



this is campus load method:
private void LoadDDCampus(int intEmployeeID)
{

DAOEmployeAttendence objDAOEmployeAttendence = new DAOEmployeAttendence();
DataTable objDataTable = new DataTable();
objDataTable = objDAOEmployeAttendence.spGetInfoAboutUser(intEmployeeID);
ddBranch.DataSource = objDataTable;
ddBranch.DataTextField = Convert.ToString(objDataTable.Columns["CampusName"]);
ddBranch.DataValueField = Convert.ToString(objDataTable.Columns["CampusID"]);
ddBranch.DataBind();

ViewState["CampusID"] = Convert.ToString(objCrypto.Decrypt(Server.HtmlEncode(Request.Cookies["UserSessionCookie"].Values["CampusID"])));

}
when i select head office or campus1 or campus 2 ,suppose i select head office then in another dropddown list should only show that head office empolyees in recieved by dropdown list. in other words if i selcet any campus then in dropdown of received by only shows that specific users according to campus selection in dropdown of campus.
div class="control-group">
<label for="textarea" class="control-label">
Received By</label>

<asp:DropDownlist ID="ddReceivedby" CssClass="input-xlarge" runat="server" >




its method load dd is:
public void loadReceivedBy()
{
DataTable dt = new DataTable();
dt = provider.spReceivedby();
ddReceivedby.DataSource = dt;
ddReceivedby.DataTextField = Convert.ToString(dt.Columns["FullName"]);
ddReceivedby.DataValueField = Convert.ToString(dt.Columns["EmployeeID"]);
ddReceivedby.DataBind();
}
and its store procedure is spReceivedby():
ALTER PROCEDURE [dbo].[spReceivedby]
AS
SELECT '0' AS EmployeeID, 'Select' AS FullName
UNION
SELECT EmployeeID,FullName
FROM EmployeeProfile
RETURN
so what should i do??
Posted
Updated 12-Feb-15 20:04pm
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900