I'm wondering if I'm going to store some data into the session is it going to be there while the user is authenticated (using formsauth) or might happen that the data will suddenly go null
I want to connect my Table adapter with the Oracle, for that I am preparing a sql query with the query builder. The query which is running fine in Oracle but makes syntax error with query builder.It shows unable to parse the query text. I am using case statement and joins within the query.
I have a partial view that I use for editing and creating my models. When a user is editing the model, I would like a particular drop-down to be rendered as text as I don't want them to change it. A read-only drop-down would suffice, but I'd prefer text.
I'm thinking I can accomplish this via an extension method, but I'm not quite sure how to get started. Any help would be appreciated!
Hi, I'm wondering about one thing - let's assume that the user clicks a button, and the asynch controller's action is invoked. What happens, when the asynchronous action takes e.g. 10 seconds? The user has to wait 10 seconds to view the result of the action? If so, are the asynch controllers really helpful ?
I am working on a MVC web form where user will submit the Album information in the first step, after submitting the Album information in the second step user can submit the track information data.But i am little confused how i ll do in MVC , in normal webform it is easy for me to do .I am looking for some sloution for this.
I currently have a function that gets some data from the database and puts it into a dataset. The return type on my function is GenericCollection (Of CustomerDetails)
If I do this:
Dim dataset As DataSet = Read(strSQL.ToString) 'Gets Data from DB
What's the most efficient way to map the dataset results to an collection of objects. More importantly, since I'm using GenericCollection, is there a way to do this in which I can call a function from the ObjectType class (CustomerDetails) that would have a means to converting that specific object.
Or is there a way in which I can use a function that would handle all types?
Is there a way to do something like:
Return returnedResults.TransformDataSet(dataset)
In which returnedResults is an object collection Of CustomerDetails, or would it simply be easier to have TransformDataSet return an object collection Of CustomerDetails by itself?
Thanks for any help.
Hi,
I am developing a web page in which a rad grid displays the list of exams. I included a template column which shows count down timer when the exam is going to expire.
Code is as given below:
<telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="false">
<MasterTableView>
<Columns>
<telerik:GridTemplateColumn HeaderText="template" DataField="Date">
<ItemTemplate>
<script language="JavaScript" type="text/javascript">
TargetDate = '<%# Eval("Date") %>';
BackColor = "white";
ForeColor = "black";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js" type="text/javascript"></script>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
I am giving DataTable as datasource to this grid. But my problem is , the template column is showing data only for the first record and the value taken is from the last row in the DataTable.
For Ex: If I give data as given below, I can see 3 records but with only the first record displaying the counter with last value(10/10/2010 05:43 PM).
02/02/2011 01:00 AM
08/09/2010 11:00 PM
10/10/2010 05:43 PM
Could you please help in this??
Thanks,
Mahesh
When a user clicks a button I need to create a .bmp file on the server. After the .bmp file is created I will load it into the html page. Would Ajax be the best way to accomplish this?
I am using Ajax.BeginForm to post comment.
How should I update the Comments section area to incorporate this new comment?
I am displaying comments on the page using the typical "foreach(Comment comment in Model.Comments)"
i have uploaded my site on hosting server with name www.selectionfurnishing.com
but when i try to open any page i got an error that the site does not exits
when i try www.selectionfurnishing.com/default.aspx then it gives error that the page does not exits (404)
please tell me how can i solve this ....
Thanks
How should I go about this? I mean how does the control know whether someone is logged in or not? Session ID? Cookies?
Recommendation of which one I should implement? A guide or tutorial would be appreciated.
I have a class User and a class History. History has 'User' property, and User has 'Histories' property. So there's a database relationship.
But when I create a new User history class and set UserID property, I can't access the 'User' property.
var history = new History { UserID = 1 };
// history.User = null ???
How can I get the user?
My view uses ModelX to render my HTML form and my controller action takes ModelY as input when saving the form. It seems the typesafe textbox API assumes I am using the same model in both places.
Is it possible to use different models and beeing type safe without creating my own helpers ?
<% = Html.TextBoxFor(x => x.Text) %>
I would like something like this. Does it exist ?
<% = Html.TextBoxFor<InputModel,OutputModel>(input=>input.Text, output=>output.SomeOtherText)
I would like to use the IEnumerable function Intersect() to combine a few list and get the similar integers from each list. The problem I'm faced with is that I don't know how many list I will need to compare.
Here is an example:
A{1,2,3,4}
B{1,2,3}
C{1,2}
results = A.Intersect(B).Intersect(C)
This works great, but the next time around I may have a D{1,2} next time I come across the function.
I'd like to use the Intersect method, but I'm open to new ideas as well.
Hi I have a usercontrol which includes some JavaScript, if I add the control to a standard web page I can start the JavaScript in the body tag, like this
<body onLoad="Start()">
The problem is that I need to add the control to a webpage which is inside a masterpage, how do I then start the script when a page inside a masterpage doesn't have a body tag.
So what I have is a bunch of dynamically created textboxs that when the user enters some data and either tabs out or clicks out some calculations are done. After the page posts back control focus is lost. What I need is to be able to set focus back to the control that was tabbed to or clicked into not the control that data was entered into.
I have a few ActionLinks that when rendered are getting a length key/value added that appears to indicate the number of characters of the controller name. How can this be removed?
Hello,
I'm wondering the opinion of what is the best way to pass a lot of values between pages. I was thinking of either saving the values to a database, using context.Items[], or Session[]. I'm not sure about what is the best method. I'm passing probably around 40 variables.
I have a page, lets call it SourceTypes.aspx, that has a a GridView that is displaying a list of Source Types. Part of the GridView is a DataKey, SourceTypeID. If source TypeID is passed to the page via a query sting, how to I put the Gridview into Edit mode for the appropriate row based on the SourceTypeID?
The GridView is bound to a SQlDataSource object.
I have a feeling I am going to kick myself when the answer appears!!
I have looked at Putting a gridview row in edit mode programmatically but it is some what lacking in specifics
I'm creating a custom ActionResult class and I need it to be able to operate on a UserControl. All of the examples I've found so far pass in the full path like so:
return MyResult("~/ControllerName/UserControlName.ascx", myModel);
But I'd like it to operate the same way as calling View(), i.e. I just pass in the name and MVC determines the correct route:
return MyResult("UserControlName", myModel);
Is there a way I can find out the correct route to the control without specifying it manually?
In my web.config I have the following:
<customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/>
When an error occurs, the user is redirected to /error.aspx?aspxerrorpath=/somepage where I can get user's name, name of the page, date, but... I can't get the error message!
I can get it via the OnException method, but then I won't be able to get the name of the page which is very important for me.
How can I get both the page and the error message?
I am trying to use checkboxes to select the items in a Listview. I have added a checkbox control in the , and they are displayed properly.
The problem is that Checked property never changes when I click on them. Why does this happen? And is there a workaround?