Click here to Skip to main content
15,918,742 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Showing Data Vertically Pin
Mike Ellison3-Aug-09 19:11
Mike Ellison3-Aug-09 19:11 
QuestionRe: Showing Data Vertically Pin
Srikanth19873-Aug-09 19:29
Srikanth19873-Aug-09 19:29 
AnswerRe: Showing Data Vertically Pin
Mike Ellison4-Aug-09 2:50
Mike Ellison4-Aug-09 2:50 
AnswerRe: Showing Data Vertically Pin
Abhijit Jana3-Aug-09 19:22
professionalAbhijit Jana3-Aug-09 19:22 
QuestionSerial number in dataset Pin
yesu prakash3-Aug-09 17:55
yesu prakash3-Aug-09 17:55 
AnswerRe: Serial number in dataset Pin
r a m e s h3-Aug-09 18:06
r a m e s h3-Aug-09 18:06 
AnswerRe: Serial number in dataset Pin
N a v a n e e t h3-Aug-09 18:49
N a v a n e e t h3-Aug-09 18:49 
QuestionAnyone use StructureMap in an asp.net site? I'm having an issue. Pin
Goalie353-Aug-09 17:52
Goalie353-Aug-09 17:52 
Hello.

I wasn't able to find much help on StructureMap's website, so I'm hoping perhaps I can find some help here. I think I have just a small bug in my StructureMap code, but I'm not sure where....

I'm trying to install structuremap into my 1st website but I'm unable to successfully reference classes set within structuremap. I have 2 projects: a c# class library (MyCompany.MySite.Core) & my website (MyCompany.MySite.Web). My structuremap.config contains a reference to a class I created called "IRedirector". The config file looks like the following:
<?xml version="1.0" encoding="utf-8" ?>
<StructureMap>
  <Assembly Name="MyCompany.MySite.Core" />
  <Assembly Name="MyCompany.MySite.Web" />
  <PluginFamily Assembly="MyCompany.MySite.Core" Type="MyCompany.MySite.Core.Impl.IRedirector" DefaultKey="Default"/>
</StructureMap>


My IRedirector class looks like this:
namespace MyCompany.MySite.Core.Impl
{
    [PluginFamily("Default")]
    public interface IRedirector
    {
        /// <summary>
        ///     Sends the user to the home page.
        /// </summary>
        void GoToHomePage();

        /// <summary>
        ///     Sends the user to the error page.
        /// </summary>
        void GoToErrorPage();
    }
}


Now, as I understood it, I should be able to reference this class in my website by referencing MyCompany.MySite.Core, but I get an error. Instead, my website wants MyCompany.MySite.Core.Impl.
For example, the following is incorrect:
using MyCompany.MySite.Core;

namespace MyCompany.MySite.Web
{
     public class Global : System.Web.HttpApplication
     {
          protected void Application_Error(object sender, EventArgs e)
        {
            IRedirector redir = ObjectFactory.GetInstance<IRedirector>();
            redir.GoToErrorPage();
        }
     }
}


In that example, the line beginning with "IRedirector" will throw an error, unless I add a reference to "using MyCompany.MySite.Core.Impl;"

I want to reference it using only "MyCompany.MySite.Core". Any idea what I'm doing wrong?

Thanks.
AnswerRe: Anyone use StructureMap in an asp.net site? I'm having an issue. Pin
N a v a n e e t h3-Aug-09 18:55
N a v a n e e t h3-Aug-09 18:55 
GeneralRe: Anyone use StructureMap in an asp.net site? I'm having an issue. Pin
Goalie353-Aug-09 19:08
Goalie353-Aug-09 19:08 
GeneralRe: Anyone use StructureMap in an asp.net site? I'm having an issue. Pin
N a v a n e e t h3-Aug-09 22:12
N a v a n e e t h3-Aug-09 22:12 
Questionwebbrowser inside website Pin
nelsonpaixao3-Aug-09 15:25
nelsonpaixao3-Aug-09 15:25 
AnswerRe: webbrowser inside website Pin
N a v a n e e t h3-Aug-09 16:26
N a v a n e e t h3-Aug-09 16:26 
GeneralRe: webbrowser inside website Pin
nelsonpaixao4-Aug-09 15:35
nelsonpaixao4-Aug-09 15:35 
AnswerRe: webbrowser inside website Pin
Christian Graus3-Aug-09 16:28
protectorChristian Graus3-Aug-09 16:28 
QuestionAutosuggest in Textbox without lossing old value in ASP.net Pin
kavyamark3-Aug-09 12:00
kavyamark3-Aug-09 12:00 
AnswerRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
Christian Graus3-Aug-09 12:13
protectorChristian Graus3-Aug-09 12:13 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
kavyamark6-Aug-09 9:53
kavyamark6-Aug-09 9:53 
AnswerRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
Blue_Boy3-Aug-09 13:11
Blue_Boy3-Aug-09 13:11 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
kavyamark6-Aug-09 9:57
kavyamark6-Aug-09 9:57 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
kavyamark6-Aug-09 10:03
kavyamark6-Aug-09 10:03 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
Blue_Boy6-Aug-09 10:34
Blue_Boy6-Aug-09 10:34 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
kavyamark6-Aug-09 11:56
kavyamark6-Aug-09 11:56 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
Blue_Boy6-Aug-09 22:09
Blue_Boy6-Aug-09 22:09 
GeneralRe: Autosuggest in Textbox without lossing old value in ASP.net Pin
kavyamark7-Aug-09 9:14
kavyamark7-Aug-09 9:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.