milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

DropDownList - disabled

Details
Written by: Stanko Milosev
Category: MVC 3
Published: 13 January 2013
Last Updated: 13 January 2013
Hits: 7006

If I understand it good, your controller has to look like:

public ActionResult Edit(int id)
{
  Partner partner = db.Partners.Find(id);
  ViewBag.Sifra = new SelectList(db.Partners, "Sifra", "Naziv", partner.Sifra);
  return View(partner);
}

view:

@Html.DropDownList("Sifra", null, new { disabled = "disabled"})

AccountController

Details
Written by: Stanko Milosev
Category: MVC 3
Published: 08 January 2013
Last Updated: 04 July 2013
Hits: 5706

If on

Membership.CreateUser(model.UserName, model.Password, model.Email, null, null, true, null, out createStatus);

You are receiveng messages like:

The user instance login flag is not supported on this version of SQL Server. The connection will be closed.

or

Unable to connect to SQL Server database.

Then check in your Web.config file:

add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"

<connectionStrings>
<add name="ApplicationServices"
connectionString="Data Source=MyPC;

Connection string name must be same as name of SqlMembershipProvider connection string.

If after you receive error like:

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

Then in command prompt execute something like:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe -S MyServer -U MyUserId -P myPass -A all -d MyDb

And if you receive error like:

Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances

Then in MS SQL Server execute:

exec sp_configure 'user instances enabled', 1 Reconfigure

and restart server...

Would you like to share your location with...

Details
Written by: Stanko Milosev
Category: MVC 3
Published: 26 December 2012
Last Updated: 11 February 2013
Hits: 5355

If you are receiving similar message, then there is code some part which is trying to determine your location. In my case problem was with Bing maps:

mm.GeoLocationProvider(this.map).getCurrentPosition({

In other cases search for GeoLocation.

There is already an open DataReader associated with this Command which must be closed first.

Details
Written by: Stanko Milosev
Category: MVC 3
Published: 12 November 2012
Last Updated: 12 November 2012
Hits: 5294
If you are receiving error message as in title, then in connection string add:

multipleactiveresultsets=True

Something like:

<add name="MyDbContext" 
connectionString="
  Data Source=myServer;Initial Catalog=MyDb;
  Persist Security Info=True;
  Integrated Security=True;
  multipleactiveresultsets=True
" />
  1. Writing HTML Helpers
  2. Routing
  3. DbContext
  4. Non-identity id key

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 47 of 168

  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51