You can fire up the site that contains this code with no problems - until someone requests the page that includes this code.
You can't pass such a message using ViewData or ViewBag because here one request (the one that causes deletion) wants to pass data to another request (the one that renders a table of records).
You can explicitly set it instead of using var: int result.
Here's some code: var db Database.About getting a value from a datarow column, you use the Item property.Null) data TempData"myData" as string; return View Points to Remember : TempData can be used to store data between two consecutive requests.It is dictionary type which is derived from.Alternatively, you can prevent the return type becoming dynamic.Now if the stored procedure would return rows with null in ProductID, wouldn't that mean that you return amounts but you don't know the product :confused: What I'm after is that should you instead modify the SQL inside the stored procedure to possibly eliminate this.It will return -1 if the query did not affect any rows of data.QuerySingle, object, represents a single row returned by the query, or the first of multiple rows.There are a couple of ways to test this, both of which make use.; CustomerInfo info new CustomerInfo.If you observe ViewData object in Quick Watch window you will see this: The ExtraInfo dynamic property is actually stored as ExtraInfo ViewData key!Query(commandText, result @if(unt 0) div Query returned @unt records /div Just to reinforce the point, there are no parentheses after Count.TempData internally uses Session to store its values.
The @model sets the data model for the view to stomer.
You can add a key-value pair in TempData as shown in the below example.
linerider version 2 mac