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
J

Jesse Squire

@Jesse Squire
About
Posts
426
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Disabling a ModalPopupExtender via JavaScript
    J Jesse Squire

    I hadn't thought of that. Its a great approach, and very clean. I like it. I do want to point out that you'd need to run this code for every async postback performed by an UpdatePanel anywhere on the page. The client-side page manager will reinitialize all script components on the page each time an UpdatePanel refreshes. Obviously, this would also have to be repeated on every standard postback.

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET csharp javascript com sysadmin tutorial

  • Disabling a ModalPopupExtender via JavaScript
    J Jesse Squire

    As far as I'm aware, there isn't a way to truly disable the popup, other then using the $clearHandlers[^] method on the button itself. The downside to this is that you'd have to do it on any postback operation (including an async postback run through an UpdatePanel). Detaching the event also suffers from a bit of tricky timing in a postback scenario, as you're in a race with the modal extender trying to attach the event. The ModalPopupExtender does have a client-side API which exposes a showing event that can be trapped, and cancelled. This will allow you to stop the popup from showing itself, although, the event will still be triggered on each click of the button. For example, the following was my quick prototype:

      var loadInitialization = function()
      {
        var extender = $find('MyExtenderBehaviorId');
        var handler = Function.createDelegate(extender, function(sender, args) { args.set_cancel(true); });
        extender.add_showing(handler);
      }
      
      Sys.Application.add_load(loadInitialization);
    

    My apologies for the poor formatting, but CopyTextAsHTML doesn't work for code-in-front. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET csharp javascript com sysadmin tutorial

  • designing a framework........
    J Jesse Squire

    That's a rather broad question for a reasonable answer on a forum. I'd recommend that you start by getting Framework Design Guidelines[^], authored by Brad Abrams and Krzysztof Cwalina of Microsoft's CLR team. While you're waiting for that to arrive, start reading through some results from Google[^]. Hope that helps to get you started. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET csharp asp-net design question

  • ASP.NET membership tables in SQL Server
    J Jesse Squire

    Its used for personalization. This entry[^] from Microsoft describes them in the context of Web Parts personalization, but if memory serves me correctly, I believe they are also used for other personalization that is not bound to the user profile. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET asp-net question csharp database mysql

  • Tabs control - Ajax Control Toolkit
    J Jesse Squire

    It may be helpful to post some of your code at this point, as I'm unable to reproduce the behavior that you're seeing. Hopefully, that will help us to find the issue.

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET sysadmin testing beta-testing help question

  • Accessing Form Components from another class(namespace)
    J Jesse Squire

    Any time that you are accessing something from the base class library, you are accessing code that lives in another namespace. For an explicit example, create a console application and observe the default namespace assigned to your code. Now, add a call to Console.WriteLine and output some text. If you place your mouse pointer over the word Console, you'll notice that it is a class defined in the System namespace. Thus, you have just accessed a class defined in another namespace. I get the feeling, however, that this is not the question that you meant to ask. You may wish to try rephrasing so that your intended question is a bit more clear. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    C# csharp com tools question

  • how to redirect in to a perticular panel
    J Jesse Squire

    Lets assume that your panel2's id is "panel2". If you formatted your link as default.aspx#panel2 when redirecting, the browser will attempt to jump to that element. If there is enough content, the browser will scroll so that the element with "panel2" is the element at the top of the page. If there is not enough content, it will scroll "panel2" as close to the top as possible. One thing to keep in mind with ASP.NET and server controls is that the id that you assign may not be the id that the browser receives. Be sure to use the ClientID property of panel2 to ensure the id is fully formed. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET tutorial question

  • Tabs control - Ajax Control Toolkit
    J Jesse Squire

    In the prototype that I tested with, the tab control did retain its value through postbacks, whether I changed tabs by clicking them in the UI or used the client script API to set the tab. The only time that I was able to reproduce the behavior that you are seeing is when I explicitly set the ActiveTabIndex property of the control on the server side. In that case, the index that I requested was honored. Are you setting the ActiveTabIndex property at all? If so, you may need to ensure that you're only setting it when not in a postback. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET sysadmin testing beta-testing help question

  • Is there any free end-user report designer?
    J Jesse Squire

    If you are using SQL Server 2005 or above, you may want to take a look at Report Builder[^]. It is a component of the suite, in the form of a ClickOnce application that is intended for allowing end users to create/customize reports on SQL Server Reporting Services. A google search will net you a bunch more information. Hope that helps to get you started. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    C# csharp visual-studio design tools question

  • Dates Problem
    J Jesse Squire

    When the user does not enter a value, retrieving the Text property returns an empty string. You are attempting to perform an implicit conversion of "" to a date, which is not possible. You'll need to guard against this by testing to ensure that there is a value in the textbox before converting, or by using DateTime.TryParse. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET help

  • increase values in a loop
    J Jesse Squire

    For that, you'll have to do more then check against a single number. The easiest way is to eat some casting cost and compare the current value to the one that you selected. Something like:

    int controlValue = Int32.Parse(selectedValue);

    int currentValue;

    foreach (ListItem item in myDropDown.Items)

    {

    currentValue = Int32.Parse(item.Value);

    if (currentValue < controlValue)

    {

    continue;

    }

    // Do Work

    }

    will increment only numbers >= your selected value.

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET data-structures help

  • increase values in a loop
    J Jesse Squire

    If you're always looking to skip the first item, then you could use a simple for loop to start at the second item in the list.

    for (int index = 1; index < myDropDown.Items.Count; index++)

    {

    string value = myDropDown.Items[index].Value;

    // Work here.

    }

    If you're looking to skip arbitrary values, you could test for them and skip past them.

    foreach (ListItem item in myDropDown.Items)

    {

    if (item.Value == "2")

    {

    continue;

    }

    // Work here.

    }

    Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET data-structures help

  • increase values in a loop
    J Jesse Squire

    If you are always following the pattern that you illustrate above, with the items sorted, you may want to consider simply removing the lowest item in the list and adding a new item. Something similar to the following code would allow you to achieve your goal without needing to loop at all.

    int topValue = Int32.Parse(myDropDown.Items[myDropDown.Items.Count - 1].Value);

    string newValue = topValue++.ToString();

    myDropDown.Items.Add(new ListItem(newValue, newValue));

    myDropDown.Items.RemoveAt(0);

    Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET data-structures help

  • Dynamic Control Events not Fireing
    J Jesse Squire

    Christian makes a great point that I overlooked. :-O While setting AutoPostBack and assigning an id will get your event to fire, you will not be able to query the value of the radio button list. As he mentions, your control is being created too late in the cycle for it to receive its state. ViewState is restored after the page's Init cycle and before the Load cycle. You may wish to consider creating your controls either in the OnInit method or in an Init event handler.

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET database help question

  • Javascript Timer
    J Jesse Squire

    The best that you can do is call window.close and have the user answer the prompt. Modern browsers will not allow you to close the browser window without user consent as the browser belongs to the user, not to your application. The one exception, if memory serves me, is opening a modal popup window in Internet Explorer. I would recommend that you steer clear of this, if possible, as it relies on browser specific behavior. Not only will it bind your application to IE, but future versions of IE are not guaranteed to support it. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET javascript tutorial

  • Dynamic Control Events not Fireing
    J Jesse Squire

    It appears that we missed setting the RadioButtonList property AutoPostback to true. Without that being set, there will be no postback when the value changes. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET database help question

  • vs 2005 and windows vista untimate
    J Jesse Squire

    Visual Studio 2005 has problems on Vista when not running as an administrator. Microsoft recommends that VS2005 be configured to allow it to run as an administrator (see references below). Microsoft also recommends that you install SP1 and the Vista patch for Visual Studio to help correct the incompatibilities. As far as the inability to debug IIS, it actually has nothing to do with the ASP.NET user. Rather, it has to do with VS not having permissions to attach to the worker process. If running as VS with administrator rights doesn't help you (it never worked for me), you can manually attach the debugger. To do so, open the Debug menu in Visual Studio and select the Attach to Process item. In the modal window, select the process titled w3wp.exe and click Attach. If you don't see the w3wp.exe process, open a browser and point to the url that you wish to debug. Additional resources:

    • Windows Vista User Account Control[^] (look for Scenario 2)
    • Visual Studio on Windows Vista[^]
    • Visual Studio on Windows Vista Issue List[^]
    • Visual Studio 2005 Service Pack Update 1 for Windows Vista[^]

    Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." -

    ASP.NET help security csharp asp-net visual-studio

  • Dynamic Control Events not Fireing
    J Jesse Squire

    Unless I miss my guess, I believe that your issue is caused by a change in the automatic ids assigned to controls during each postback. I believe that if assign an explicit value to the ID property of your RadioButtonList, it will solve your problem. Also, verify that your table has an ID assigned to it, and is being placed in the same container on the page. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET database help question

  • i am using .net2008 on vista whree i sendind SMTP mail but error is produce :- Cannot get IIS pickup directory
    J Jesse Squire

    I would suggest that you read the items that I linked for you, as they both provide examples for their respective servers. If those examples are not to your liking, my recommendation would be to visit the website for the server that you chose and peruse the documentation found there.

    ASP.NET help csharp com windows-admin

  • i am using .net2008 on vista whree i sendind SMTP mail but error is produce :- Cannot get IIS pickup directory
    J Jesse Squire

    Unlike previous versions of Windows, Vista does not include an SMTP server out of the box. You will need to install a 3rd party product. There are some recommendations for in this post [^] and in this [^] one for some alternate SMTP servers. Hope that helps. :)

    --Jesse

    "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

    ASP.NET help csharp com windows-admin
  • Login

  • Don't have an account? Register

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