Need to convert a string to normal datetime format so it can be correctly inserted onto a datetime type field.
String Format:
4/21/2010 4:43:03 PM
Example:
2010-04-21 16:43:03.000
Greeting,
I'm beginer of ajax technology and now i need to create two dropdown in
MVC project for example:
First dropdown has the list of classroom [601,602,603] when i choose one then next
dropdown will has the list of student belong to each class room.
Now, I already create the repository class that has method GetStudentByClassroomName()
and…
I recently upgraded my MVC 1 project (ASP.NET 3.5) to MVC 2 (ASP.NET 4). I noticed there is now a folder "aspnet_client\system_web\4_0_30319" under the site root. This folder is empty... I'm just wondering if anyone knows why it was created.
I remember the aspnet_client folder from the days of .NET 1.1, but I thought it was obsoleted when .NET 2.0…
Hello all,
I'm using Enterprise library, but the idea is the same. I have a SqlStringCommand and the sql
is constructed using StringBuilder in the forms of
"insert into table (column1, column2, column3) values (@param1-X, @param2-X, @parm3-X)"+" "
where "X" represents a "for loop" about 700 rows
StringBuilder sb = new StringBuilder();…
Question: I want to call a generic function, defined as:
Public Shared Function DeserializeFromXML(Of T)(Optional ByRef strFileNameAndPath As String = Nothing) As T
Now when I call it, I wanted to do it with any of the variants below:
Dim x As New XMLserialization.cConfiguration
x =…
Can anyone explain why the following happens? And how to resolve, Visual Studio 2010 and MVC2
<%= Html.ActionLink("Add New Option", "AddOption", "Product", new { @class = "lighbox" }, null)%>
Results in
/Product/AddOption?class=lightbox
<%= Html.ActionLink("Add New Option",…
Hello,
I'm trying to add more fields to the CreateUserWizardStep, here is what I added:
<asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
<ContentTemplate>
<table border="0">
<tr>
<td align="right">
…
Hi,
I am trying to find out what would be the best bind first element of ISet (Iesi.Collection) as a first element.
So basically I only have to use some kind of collection that has an indexer (and ISet doesn't) then I can write code like this (which works perfectly well):
<%:…
Is there anyway to override the custom validation error messages from the ValidationAttributes?
Basically I need the ValidationAttributes to support globalization.
Thanks in advance.
Is it possible to read the GUID from the Assembly without actually loading it in the current App Domain.
Normally Assembly.Load loads the DLL into the app domain. I just want to read the value.
The description of the GUID is
'The following GUID is for the ID of the typelib
'…
According to the new 4.0 framework overview, one should be able to add the attrib RenderOuterTable="false" to a control that supports the attribute and see css friendly code be spit out - in other words no html tables.
To test this, I threw a login control into a basic fresh…
While designing a master page i am adding a number of images to it.
I have an image tag inside the master page,
<img src="../../Content/Images/img19.jpg" class="profileImage" />
When i run my app, the image doesn't show up in the browser because the src path in the…
I have a User Control that contains a System.Web.UI.WebControls.FileUpload control as well as a button to 'Submit'.
When the button is clicked code similar to the following is executed:
If FileUploadControl.HasFile Then
'Save the file and do some other stuff
End If
…
hi,
I have a logOn forn in ascx files and I render it as partial.
How I can add a clinet side validation to this form, have any idea ?
My below code does not work
<%= Html.ValidationSummary(true, "Giris basarisiz oldu. Lütfen hatalari düzeltip tekrar deneyin.")…
i am creating a generalize deleteusercontrol , my aim is that on the listing page where all the records are listed when the delete is pressed i want to display the acknowledgment on the same page up the list. I had little idea to do that
q1) first of all where will i…
When I trying to send form containing value with xml, I get HttpRequestValidationException:
A potentially dangerous Request.Form value was detected from the client
All approaches I found:
<%@ Page ValidateRequest="false" %> in .aspx-file.
<pages…
Hello,
I was wondering if there are any downsides of storing a custom Principal in httpcontext.current.items instead of the httpcontext.current.user. I know you need to set it for each request but I have to do that with httpcontext.current.user also.
thanks…
I have a "small" enterprise application, aspnet mvc 3 + entity framework with POCO entity and repository pattern. I structured the solution in 4 projects:
POCO entities
Domain model
Services
web application
When the application performs a query on the…
I have a site where I use CustomErrors in the web.config to specify a custom error page, and that's working just fine. The custom 404 page is also specified in the IIS configuration (because if it's not, I don't get my custom 404 page).
But I have some…
Hey all,
Just building a quick, simple site with MVC 3 RC2 and RavenDB to test some things out.
I've been able to make a bunch of projects, but I'm curious as to how Html.ActionLink() handles a raven DB ID.
My example: I have a Document called…
The ignore route is defined like this:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Why not
routes.IgnoreRoute("{resource}.axd/{*}");
What is the significance of pathInfo?
Thanks.
Hi,
I read at Scottgu blog about using OutputCache for a function but this didn't worked for me. How can I use [OutputCache(Duration=60)] for a function and can I add VaryByParam in this statement? Which namespace is required?
I have an web application that I'm working on, it was working fine until my curiosity got the better of me and I right-clicked on a view and chose Set As Start Page option. Now, whenever I run my application it takes me to the Resource Not Found…