Click here to Skip to main content
15,905,877 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTo create a website for Examination system Pin
adit ya16928-May-10 14:58
adit ya16928-May-10 14:58 
AnswerRe: To create a website for Examination system Pin
Peace ON28-May-10 19:31
Peace ON28-May-10 19:31 
AnswerRe: To create a website for Examination system Pin
R. Giskard Reventlov28-May-10 19:32
R. Giskard Reventlov28-May-10 19:32 
Questionsql help Pin
Aljaz11128-May-10 7:45
Aljaz11128-May-10 7:45 
AnswerRe: sql help Pin
Not Active28-May-10 8:05
mentorNot Active28-May-10 8:05 
GeneralRe: sql help Pin
Aljaz11128-May-10 8:40
Aljaz11128-May-10 8:40 
Questionhow to fire an event from a different Pin
raghvendrapanda28-May-10 5:33
raghvendrapanda28-May-10 5:33 
AnswerRe: how to fire an event from a different Pin
Peace ON28-May-10 5:44
Peace ON28-May-10 5:44 
AnswerRe: how to fire an event from a different Pin
Sandeep Mewara28-May-10 7:38
mveSandeep Mewara28-May-10 7:38 
GeneralRe: how to fire an event from a different Pin
raghvendrapanda1-Jun-10 3:37
raghvendrapanda1-Jun-10 3:37 
QuestionAjax CascadingDropdownControl Pin
Ratnesh N Bharos28-May-10 3:16
Ratnesh N Bharos28-May-10 3:16 
AnswerRe: Ajax CascadingDropdownControl Pin
Peace ON28-May-10 3:22
Peace ON28-May-10 3:22 
Answer[Cross-post]: Ajax CascadingDropdownControl Pin
Sandeep Mewara28-May-10 4:20
mveSandeep Mewara28-May-10 4:20 
QuestionImage upload dimensions Pin
Paul McGann28-May-10 2:12
professionalPaul McGann28-May-10 2:12 
AnswerRe: Image upload dimensions Pin
JHizzle28-May-10 2:26
JHizzle28-May-10 2:26 
GeneralRe: Image upload dimensions Pin
Paul McGann28-May-10 2:57
professionalPaul McGann28-May-10 2:57 
AnswerRe: Image upload dimensions Pin
Peace ON28-May-10 2:28
Peace ON28-May-10 2:28 
GeneralRe: Image upload dimensions Pin
Paul McGann28-May-10 2:58
professionalPaul McGann28-May-10 2:58 
Questionmultiple web.config file in on application Pin
tanweer28-May-10 1:50
tanweer28-May-10 1:50 
AnswerRe: multiple web.config file in on application Pin
Peace ON28-May-10 2:03
Peace ON28-May-10 2:03 
AnswerRe: multiple web.config file in on application Pin
Jamil Hallal28-May-10 3:37
professionalJamil Hallal28-May-10 3:37 
QuestionReturn List<> from user control & bind to parent page grid. Pin
zeego28-May-10 1:07
zeego28-May-10 1:07 
AnswerRe: Return List from user control & bind to parent page grid. Pin
Peace ON28-May-10 1:22
Peace ON28-May-10 1:22 
GeneralRe: Return List from user control & bind to parent page grid. [modified] Pin
zeego28-May-10 1:31
zeego28-May-10 1:31 
Update:

Ok, I created two public properties, now I want to return the selected checkbox items in the checkbox list and return them on button click so I used a foreach, not much sure about my approach.Here is how its looking now. How to bind the results with parent page gridview on user control button click ?
public partial class assets_WebControls_ftExclusions : System.Web.UI.UserControl
{
    private int id; // the id passed from parent page
    private ftExclusionsList myftExclusions;   // the list to return to master page

    public  int ID
    {
        get{return ID;}
        set{ID=value;}
    }

    public ftExclusionsList selectedExclusions
    {
        get { return myftExclusions; }
        set { myftExclusions = value; }
    }
   
    protected void Page_Load(object sender, EventArgs e)
    {
// Just binding the checkbox list with selected items/total items
        if (!Page.IsPostBack)
        {
            cblExclusions.DataBind();
            ftExclusionsList myExcluList = ftExclusionsManager.ftExclusionsById(ID);
            if (myExcluList != null)
            {
                if (myExcluList.Count > 0 && myExcluList != null)
                {
                    foreach (ftExclusions ex in myExcluList)
                    {
                        cblExclusions.Items.FindByValue(ex.excluId.ToString()).Selected = true;
                    }
                }
            }
        }
        
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {// returning result set here how to bind it with gridview on parent page ? :( 
        ftExclusionsList myFTExclusionList = new ftExclusionsList();
        foreach (ListItem li in cblExclusions.Items)
        {
            if (li.Selected == true)
            {
                ftExclusions myftExclusion = new ftExclusions();
                myftExclusion.ftExcluId = Convert.ToInt32(li.Value);
                myftExclusion.excludesc = li.Text.ToString();
                myFTExclusionList.Add(myftExclusion);
            }
            
        }
        selectedExclusions = myFTExclusionList;
    }
}


modified on Friday, May 28, 2010 7:53 AM

Questionmake website url like www.websitename.com/username Pin
sumit703428-May-10 0:54
sumit703428-May-10 0:54 

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.