c#
Most efficient way to update with LINQ to SQL
Can I update my employee record as given in the function below or do I have to make a query of the employee collection first and then update the data?
How can I redirect to a page when the user session expires?
I am currently working on an web application that uses ASP.NET 2.0 framework. I need to redirect to a certain page, say SessionExpired.aspx, when the user session expires. There are lot of pages in the project, so adding code to every page of the site is not really a good solution. I have MasterPages though, which I think might help.
What is a complex type in entity framework and when to use it?
I have tried to read the msdn article on complex types. But it does not explain when to use it. Also there is not a comprehensive explanation on the web on complex types and when to use them.
How to render decoded HTML in a (i.e. a ) in GridView cell
I’m binding a GridView to an LINQ query. Some of the fields in the objects created by the LINQ statement are strings, and need to contain new lines.
Getting value from a cell from a gridview on RowDataBound event
string percentage = e.Row.Cells[7].Text; I am trying to do some dynamic stuff with my GridView, so I have wired up some code to the RowDataBound event. I am trying to get the value from a particular cell, which is a TemplateField. But the code above always seems to be returning an empty string. Any ideas? … Read more
Best way to check if a drop down list contains a value?
When the user navigates to a new page, this ddl’s selected index is determined by a cookie, but if the ddl doesn’t contain that cookie’s value, then I’d like it to be set the 0. What method would I use for the ddl? Is a loop the best way, or is there a simply if statement I can perform?
How to call controller from the button click in asp.net MVC 4
Please i am working on MVC website, i have a Search page and another search form on index page. I want to call the the same search page controller when i click the search button from index page. Below is how my button is on the index page.
Convert Windows timezone to moment.js timezone?
We have an app in ASP.NET that stores all user timezone data in Windows format (by TimeZoneInfo.Id).
How do I use the cookie container with RestSharp and ASP.NET sessions?
I’d like to be able to call an authentication action on a controller and if it succeeds, store the authenticated user details in the session.