i trying data database gives me null data. due unable use viewdata in aspx file. missing ?
studentdata data = new studentdata(); using (var connection = databaseconnectivity.getbranchconnection()) using (var command = connection.createcommand()) { command.commandtext = databaseconnectivity.getisolationlevelstatement(system.data.isolationlevel.readcommitted) + @"select" + @"branch_name [branchname]," + @"customerid [customerid]," + @"firstname [firstname]," + @"lastname [lastname]," + @"grades [grades]" + @"from branchdata"; connection.open(); viewdata["branchname"] = data.branchname; viewdata["customerid"] = data.customerid; viewdata["firstname"] = data.firstname; viewdata["lastname"] = data.lastname; viewdata["grades"] = data.grades; } return view("studentdetails", data);
Comments
Post a Comment