User Profile

Collapse

Profile Sidebar

Collapse
castron
castron
Last Activity: Sep 28 '08, 09:43 PM
Joined: Mar 3 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • castron
    started a topic Sorting on GridView
    in .NET

    Sorting on GridView

    Hello All,

    I have a grid view that allows sorting, paging, editing, etc.

    Under On Load event, if I check: if(!IsPostBack) { DisplayData(); }, the Edit portion works fine. However, the Sorting and paging portions won't. If I just call the DisplayData() method then the Edit portion doesn't work. I found out that when sorting the sorting value doesn't persist and I need to store it elsewhere when doing postbacks, but the...
    See more | Go to post

  • castron
    started a topic Add radio button dynamically at run-time
    in .NET

    Add radio button dynamically at run-time

    Hi all,

    I'm reading user information from Active Directory. I'm allowing the users to search by username from a web form. There will be times when the result will be more than one record. What I'm trying to do is to generate radio buttons at run-time, so users can select the user account they are looking for, and then populate the information into a form.

    My question is how do I create a single event handler for more...
    See more | Go to post

  • castron
    replied to Check if user exists
    in .NET
    try this:

    SqlCommand sqlCount = myConnection.Cr eateCommand();
    sqlCount.Comman dText = "SELECT COUNT(*) FROM tablename WHERE UserName = '" + aUserName + "'";
    int recCount = (int)sqlCount.E xecuteScalar();


    if (recCount == 0) // no existing record for username
    {
    insert record
    }
    else
    ...
    See more | Go to post

    Leave a comment:


  • castron
    replied to Web Part drop down list
    in .NET
    Hi again,

    I was able to do it, but when I try to add the web part to a page, I got the following error:
    An unhandled exception has occurred.
    Request for the permission of type "System.Data.Sq lClient.SqlClie ntPermission, System.Data, Version=2.0.0.0 , Culture=neutral , PublicKeyToke=b 77a5c56e089" failed.

    Any idea?
    Thanks
    here is the code....

    public DataTable getRecords()...
    See more | Go to post

    Leave a comment:


  • castron
    started a topic Web Part drop down list
    in .NET

    Web Part drop down list

    Hi All,

    I'm trying to create a web part that will populate data in a drop down menu, I'm not sure how to pass the data from the method where I'm retrieving the data to the CreateChildCont rols method. It compiles fine, but when I add the web part to the page, there is no data in the drop down menu. I'm new on the whole .net stuff. Any help will be greatly appreciate. Thanks in avance

    here is my code I have so far
    ...
    See more | Go to post
No activity results to display
Show More
Working...