Click here to Skip to main content
15,887,477 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
AnswerRe: make website url like www.websitename.com/username Pin
Peace ON28-May-10 1:24
Peace ON28-May-10 1:24 
Questionwhy it gives an error in crystal report? Pin
hi_everybody28-May-10 0:34
hi_everybody28-May-10 0:34 
Questionhow can i send parameters by post method in asp.net? Pin
buffering8327-May-10 20:51
buffering8327-May-10 20:51 
AnswerRe: how can i send parameters by post method in asp.net? Pin
Sandeep Mewara27-May-10 21:33
mveSandeep Mewara27-May-10 21:33 
AnswerRe: how can i send parameters by post method in asp.net? Pin
Peace ON27-May-10 21:37
Peace ON27-May-10 21:37 
QuestionWeb applications impacted due to upgradation of IE 6 to IE 8 Pin
Rajiya27-May-10 18:40
Rajiya27-May-10 18:40 
AnswerRe: Web applications impacted due to upgradation of IE 6 to IE 8 Pin
Anurag Gandhi27-May-10 20:26
professionalAnurag Gandhi27-May-10 20:26 
AnswerRe: Web applications impacted due to upgradation of IE 6 to IE 8 Pin
Peace ON28-May-10 0:42
Peace ON28-May-10 0:42 
Questiontransfer datas from a table into an Object [modified] Pin
nstk27-May-10 10:56
nstk27-May-10 10:56 
AnswerRe: transfer datas from a table into an Onject Pin
Not Active27-May-10 14:38
mentorNot Active27-May-10 14:38 
QuestionJavascript calendar control for first time not openning in Mozilla Pin
attalurisubbu27-May-10 5:09
attalurisubbu27-May-10 5:09 
QuestionHow to get configuration file's path Pin
Eric Vonjacson27-May-10 2:07
Eric Vonjacson27-May-10 2:07 
AnswerRe: How to get configuration file's path Pin
Andreas X27-May-10 2:16
professionalAndreas X27-May-10 2:16 
QuestionWhere is the appropriate lifecycle step we can introduce JavaScript execution in the page Pin
yadlaprasad27-May-10 1:57
yadlaprasad27-May-10 1:57 
QuestionGridView Edit Pin
Member 322226427-May-10 1:08
Member 322226427-May-10 1:08 
AnswerRe: GridView Edit Pin
Sandeep Mewara27-May-10 1:35
mveSandeep Mewara27-May-10 1:35 

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.