Questions tagged [asp.net-3.5]

asp.net-3.5 is the 3.5 version of web development framework asp.net, part of .Net. It features: ASP.NET AJAX as a part of the runtime, new LINQ data capabilities, improved support for CSS.

1126 questions
735
votes
22 answers

How can I deserialize JSON to a simple Dictionary in ASP.NET?

I have a simple key/value list in JSON being sent back to ASP.NET via POST. Example: { "key1": "value1", "key2": "value2"} I AM NOT TRYING TO DESERIALIZE INTO STRONGLY-TYPED .NET OBJECTS I simply need a plain old Dictionary(Of String, String), or…
richardtallent
  • 32,451
  • 13
  • 78
  • 116
88
votes
11 answers

Unable to convert MySQL date/time value to System.DateTime

I get this error: Unable to convert MySQL date/time value to System.DateTime while I am trying to fetch the data from a MySQL database. I have the date datatype in my MySQL database. But while retrieving it into my datatable, it get the error…
Ankit Chauhan
  • 2,255
  • 6
  • 24
  • 36
63
votes
1 answer

Create Text File Without BOM

I tried this aproach without any success the code I'm using: // File name String filename = String.Format("{0:ddMMyyHHmm}", dtFileCreated); String filePath = Path.Combine(Server.MapPath("App_Data"), filename + ".txt"); // Process myObject…
balexandre
  • 69,002
  • 44
  • 219
  • 321
61
votes
2 answers

Forms Authentication Timeout vs Session Timeout

In my asp.net website i am using asp.net form authentication with following configuration
Hemant Kothiyal
  • 3,862
  • 18
  • 57
  • 80
44
votes
3 answers

How to make update panel in ASP.NET MVC

How do I make an update panel in the ASP.NET Model-View-Contoller (MVC) framework?
ibrahimyilmaz
  • 16,643
  • 12
  • 56
  • 79
41
votes
7 answers

how to solve Error cannot add duplicate collection entry of type add with unique key attribute 'value' in iis 7

I created a asp.net website and published it in iis 7. I deleted the default website option in the iis 7 and created the new website in the iis 7. When i click the default document I got the error like "Error cannot add duplicate collection entry of…
satya
  • 411
  • 1
  • 4
  • 3
34
votes
5 answers

How to initialize a list with constructor?

I have a type: public class Human { public int Id { get; set; } public string Address { get; set; } public string Name { get; set; } public List ContactNumbers { get; set; } public Human(int id) { Id…
haansi
  • 4,904
  • 19
  • 54
  • 90
34
votes
6 answers

Check that email address is valid for System.Net.Mail.MailAddress

Currently, to avoid errors from being thrown up due to invalid email addresses, I do the following: Dim mailAddress As MailAddress Try mailAddress = New MailAddress("testing@invalid@email.com") Catch ex As Exception 'Invalid email End…
Curt
  • 94,964
  • 60
  • 257
  • 340
34
votes
1 answer

creating a user in Active Directory: A device attached to the system is not functioning

Consider this code attempting to create an Active Directory account. It's generating an exception here with a certain set of data. It's not clear right now what's causing the exception. var user = new UserPrincipal(someValidUserContext, …
p.campbell
  • 91,713
  • 61
  • 243
  • 314
31
votes
2 answers

How the session work in asp.net?

Please any one suggest me how the session is actually work in asp.net? I am confuse in part of session and want to briefly knowledge of it so please guide me
coolbudy
  • 311
  • 1
  • 3
  • 3
27
votes
5 answers

Convert a string to a datetime

I am developing asp.net site using vb framework 3.5. Im having difficulties converting string data into Date I tried using cdate function, I have a variable sdate which is a string variable and date is stored in it which comes from textbox as…
Ishan
  • 3,818
  • 28
  • 78
  • 149
26
votes
5 answers

Stopping onclick from firing when onclientclick is false?

Is it possible to use the onclientclick property of a button to do a clientside check. If the check returns true, then fire the onclick event. If the clientside check returns false, don't fire the onclick event. Is that possible? UPDATE: These 2…
oshirowanen
  • 15,331
  • 77
  • 181
  • 330
24
votes
5 answers

Access a control inside a the LayoutTemplate of a ListView

How do I access a Control in the LayoutTemplate of a ListView control? I need to get to litControlTitle and set its Text attribute.
craigmoliver
  • 6,282
  • 12
  • 48
  • 87
24
votes
6 answers

The SELECT permission was denied on the object 'Address', database 'CNET_85731', schema 'dbo'

I have been working away for the last 7 months on a C# ASP.NET using Visual Studio 2008 and SQL Server 2008. Today, I was running part of my application which was previously running and I got the following error: The SELECT permission was denied on…
Walter Lockhart
  • 1,293
  • 3
  • 20
  • 33
23
votes
2 answers

Store and Retrieve values from web.config

I built a small website and there will be only one admin, so in the admin panel I am asking for a password with a value that I do not retrieve from a database, I just hard coded it in the function in code behind, I know this is wrong though I don't…
Maen
  • 990
  • 7
  • 17
  • 33
1
2 3
75 76