Click here to Skip to main content
15,508,200 members

Comments by Dinesh.V.Kumar (Top 148 by date)

Dinesh.V.Kumar 9-Jan-15 7:46am View    
You can not directly disable a control in a view from controller. You need to pass the model to the view. Based on the model data you can enable or disable the control.
eg:
Solution 1:

Assuming User is a model
User.Status = "success";
return View(postData, User);

In view
if(Model.User=="success")
--add control set the disabled state here
else
--add control without disabled state.


Solution 2:
You can redirect to another view that shows the success message to the user so that the user cannot do anything in the previous view.

Hope this helps

Regards
Dinesh.V.Kumar 22-Sep-14 5:31am View    
In order to group by you need to have a aggregate function in the select part of the query.
for eg:
Select si.Date, si.SalaryId,er.EmpCode, er.FName, sum(si.salary) from bl_EmpRegistration er,tbl_SalaryInformation si where er.EmpCode=si.EmpCode and si.PartnerName='Pio' and er.PartnerName='Pio' group by si.Date, si.SalaryId,er.EmpCode, er.FName
Dinesh.V.Kumar 31-Jul-14 2:27am View    
Thanks --SA-
Dinesh.V.Kumar 31-Jul-14 2:23am View    
Try replacing NVARCHAR with varbinary datatype.
Dinesh.V.Kumar 28-Jul-14 1:32am View    
Thanks Champ!!For the idea.. I will take this path and see what happens..But is there any way to pass the user id and password to login to the site..?