Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
A

ake_krakbar

@ake_krakbar
About
Posts
30
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Custom error page is ignored
    A ake_krakbar

    Unfortunately that doesn´t work. Using application.Server.Execute("Error.aspx") makes the aspnet process run error.aspx in the current page´s context, wich means that the exception is still available.

    ASP.NET csharp asp-net sysadmin help

  • folder browser dialog
    A ake_krakbar

    I'm afraid that not possible without using an active x- control or a java applet on the page.

    ASP.NET csharp asp-net help question

  • Custom error page is ignored
    A ake_krakbar

    Hello folks! I´ve implemented some custom error handling that writes the error to a log file then redirects the user to my custom error page. The strange thing is: this all works fine when i run the project in VS2005 using f5 but when i just choose to directly go to any page causing an error (like 'view in browser') error logging still works ok but my custom error page is ignored. Instead the regular asp.net error page is used. It´s done like this... First the web.config: My httpModule: public class ErrorHandlingModule : IHttpModule { private HttpApplication application; void IHttpModule.Init(HttpApplication app) { this.application = app; this.application.Error += new EventHandler(ErrorHandler); } private void ErrorHandler(Object sender, EventArgs e) { Exception ex = application.Server.GetLastError(); string errorString = "\n\n" + DateTime.Now.ToString() + " " + ex.Message + "\nInnerException: " + ex.InnerException; TextWriter tw = File.AppendText(application.Server.MapPath("errorLog.txt")); tw.WriteLine(errorString); tw.Close(); application.Server.Execute("Error.aspx"); application.Server.ClearError(); } #region IHttpModule Members public void Dispose() { } #endregion } And, finally the error page: protected void Page_Load(object sender, EventArgs e) { Exception ex = Server.GetLastError(); if (ex != null) lblErrorMessage.Text = ex.Message + "

    " + ex.InnerException; } Hope it makes sense. /J

    ASP.NET csharp asp-net sysadmin help

  • adding webcontrols at runtime in ASP.Net
    A ake_krakbar

    Hello! Remember that the textbox is created pretty late in the event cycle - in the raise change events phase. The value can´t be accessed until after that. Try accessing the value in onPreRender and you should be fine.:-D

    ASP.NET csharp asp-net help

  • How to access a sever control from javascript??
    A ake_krakbar

    I usually solve this by typing out the value from the server control to the page to a javascript variable that i can use by the script later. Typically: myLiteral.Text = "" myLiteral.Text += "var myVar=" + theValue; myLiteral.Text += "" Controls.Add(myLiteral) Then use the variable myVar on the client!

    ASP.NET javascript sysadmin tools tutorial question

  • Running a web app without the aspx files
    A ake_krakbar

    I´ve heard that its possible to run a web app without aspx files and just host the dlls on the web server. Anyhow, I haven´t managed to get this to work and haven´t found any info about how to do this. Does anybody know how it´s done?

    ASP.NET sysadmin tutorial question

  • Sharing ViewState data between controls
    A ake_krakbar

    Thanks for your reply. I tried to access the page view state, but haven´t managed to do it. There are no Page.ViewState och Context.ViewState properties. Maybe ViewState isn´t the best place to store pagewide global data that should be shared between controls...

    ASP.NET help question

  • Sharing ViewState data between controls
    A ake_krakbar

    I´m trying to share variables between two custom controls in ViewState. Control A sets a ViewState variable upon an eventhandler and after that Control B accesses the same ViewState variable. The problem is that when the second control tries to get the value from ViewState it is null. I have checked that the value is set before i try to fetch it so that´s not the problem. Is there some kind of issue here that I don´t know about? Using Session variables worked just fine, but it´s important that the data is being stored per page so I have to use ViewState. /Jonas

    ASP.NET help question

  • Databound templated controls in vs 2005
    A ake_krakbar

    Has anybody noticed that cuxtom databound templated controls are behaving differently in visual studio 2005 compared to vs 2003. When building a control from this example: http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx#templated The control works fine when displayed in the browser, but in the visual studio I cant switch from code view to design view becuase of the following error: "Cannot switch views: Content is not allowed between the opening and closing tags for element 'Repeater1'." Have anybody else experienced the same problem?

    ASP.NET visual-studio help csharp com design

  • Generate label
    A ake_krakbar

    Thats great! Thanks for your help

    ASP.NET sysadmin question

  • Generate label
    A ake_krakbar

    Yep they do, but i need the element for all my form elements, even the textbox. That way, when you click the the associated textbox recieves focus. Accessibility requirements from my customer...

    ASP.NET sysadmin question

  • Generate label
    A ake_krakbar

    oups. The forum deleted my html code. It should read "outputs as a element"... -- modified at 9:44 Tuesday 21st February, 2006

    ASP.NET sysadmin question

  • Generate label
    A ake_krakbar

    Is there any server control that outputs as a element? -- modified at 9:42 Tuesday 21st February, 2006

    ASP.NET sysadmin question

  • Exposing properties in a custom page template
    A ake_krakbar

    Hello Again Ista. If you could post the solution you are working with (or a link to it) here on this forum I would be very greatful.

    ASP.NET help

  • Exposing properties in a custom page template
    A ake_krakbar

    Hello again Ista! Do you mean that you select this element in the code view, wich makes the property show in the property browser:

    ASP.NET help

  • Exposing properties in a custom page template
    A ake_krakbar

    Hello Ista. Again, thankyou very much for your reply. Unfortunately I still don´t get this thing working at all. Are you using VS 2005?

    ASP.NET help

  • Exposing properties in a custom page template
    A ake_krakbar

    Ah when working in source mode the server side form of course is selectable. But does the properties you have added to the page class show up under server side form? That doesn´t make sense at all...

    ASP.NET help

  • Exposing properties in a custom page template
    A ake_krakbar

    Thanks for your reply! Selecting the webform (I suppose you mean the server side form) when working in the desinger is not possible. What version of Visual studio are you using? Is the designer in the "Design"- or in the "Source" mode?

    ASP.NET help

  • Exposing properties in a custom page template
    A ake_krakbar

    Here goes: public class MunkebyPage : Page { [Browsable(true)] public string Testing { get { return testing; } set { testing = value; } } private string testing; etc... The problem could be that all other properties that you set in the propertybrowser are added declerative in some way. And this is not. Have you succeeded to solve this problem?

    ASP.NET help

  • Exposing properties in a custom page template
    A ake_krakbar

    Jepp, the property is public and fully accessible from the page when used programmatically...

    ASP.NET help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups