Click here to Skip to main content
15,900,725 members

Comments by Timberbird (Top 200 by date)

Timberbird 14-Jul-15 5:56am View    
You are passing ddlC.GetDistricts(), which is of type IEnumerable (and actually is a List according to public GetDistricts() method implementation), while the model accepts @model FarmerRegisterFormAndPrint.Models.DDLCombined. I guess the error is expected in this case
Timberbird 10-Jul-15 7:34am View    
This line
Response.Redirect(NonJSTargetURL);
seems rather suspicious. What is NonJSTargetURL? Could it be that you keep redirecting user to the same login page again and again? Even if JS is enabled on client side, it could be that by some weird logic browser still executes Refresh action included in noscript element.

So, I suggest that you check if you are redirecting visitor's browser on each request - by monitoring browser's network activity (using built-in tools or eg Fiddler proxy) or checking IIS logs, for example.

Also, why do you introduce testJS variable if you don't actually use it?
Timberbird 16-Jun-15 6:46am View    
Excuse me, but how do you want to see the results like "Date = 01/06/2015, Date = 02/06/2015, Date = 03/06/2015" and so on if you group loans by year and month, not year, month and day? .GroupBy(c => new DateTime(c.CreatedDate.Year, c.CreatedDate.Month, 1)) effectively groups your loans using "First day of loan's month" as a key, so loans made on 01/06/2015, 02/06/2015 and 03/06/2015 will fall under the same group with "01/06/2015" key
Timberbird 2-Apr-15 4:38am View    
If I understand you correctly, you want to call wrapper class method when button is pressed - and WITHOUT generating Page_Load event? Then I'd change your question as following: "How to call server method from client without running common page lifecycle" (yes, Page_Load is not the only method being executed, see here). In this case you have a number of possibilities - you can implement web method and call it from client with AJAX, or move the call to a service, or event create a specific handler for this purpose.
Timberbird 24-Mar-15 11:08am View    
My bad - didn't pay atention to the tags, as I've met this problem previously in plain JavaScript. I'll update the solution.