Search

You searched for the word(s): userid:800983

Matching Posts

  • Re: Dynamic SQLdatasource data paging

    Instead of filtering, you can create your query dynamically. Such as: strQuery = "SELECT <<yourcolumns>> FROM <<yourtable>> WHERE <<yourDate>> = " + ddlMonth.SelectedValue + "/" + ddlDay.SelectedValue + "/" + ddlYear.SelectedValue; Then execute that query. Later, you can go back and change the above to use the StringBuilder class, but just trying to show you quickly how to do this. I'm not sure what you are asking for in the second
    Posted to Web Forms (Forum) by csgeyer@hotmail.com on 7/8/2009
  • Re: Need help getting DropDownList selection displayed in FormView

    Hi Joel, There are a couple of things you need to do. First you are going to need to modify your select statement in SqlDataSource2 to include the technician's id, as in: SELECT * FROM [Table1] WHERE [Tech ID] = @Tech_ID Then add a SelectParameters collection to that data source, as in: <SelectParameters> <asp:Parameter Name="Tech_ID" Type="Int32" /> </SelectParameters> Next, you need to handle the drop down list's OnSelectedIndexChanged event. On the
  • Re: Need help getting DropDownList selection displayed in FormView

    The calling Bind on FormView1 is going to cause the FormView to get the data it needs from its data source. In other words, it is going to call your select statement and then all the Binds and Evals in the textboxes are going to populate those controls with data.
  • Re: Dynamic SQLdatasource data paging

    Are you calling the above in an event handler like a button click or something similar? In that case, the datasource is created the first time the page is posted back to the server, but it is out of scope on subsequent postbacks. You are going to have to call the above code to bind to the datasource every time the user clicks on the paging links in the gridview as well. You can do that by handing the GridView's PageChanging event, as in: protected void gvSearchList_PageIndexChanging(object sender
    Posted to Web Forms (Forum) by csgeyer@hotmail.com on 7/7/2009
  • Re: Need help getting DropDownList selection displayed in FormView

    Sometimes I work from VB and forget to change over to C#. 1 - change the parens to square brackets: SelectParameters[0] 2 - Int32 is right :) 3 - I was not going about this one the right way. You can either remove this step or set the DefaultMode on the FormView declaratively as in in the aspx page with DefaultMode="ReadOnly". You could also use the DefaultMode property in the codebehind. I was trying to set it because I don't recall off the top of my head the default mode for the FormView
  • Re: Need help getting DropDownList selection displayed in FormView

    papabear - thanks for sharing the cred bro. Joel can mark both as answer!!
  • Re: Using linq to populate a ddl

    Tuppers, Set the DropDownList control's AppendDataBoundItems property to True in the aspx file and add a single ListItem with Text="Please Select One..." and Value="". Use link to add the other items. Point the required field validator at your DropDownList control. If the user does not choose a different item from the DropDownList, the validation will fail. Best! (and cool name).
  • Re: CustomValidator

    You have 2 options to cause the validation: 1. Set CausesValidation="True" in any control you want to validate the page 2. Call Page.Validate() within the event handler of a control posting back to the server, e.g. a button's onClick event. The Validate method can be called either with no argument or with the name of the validation group you want to validate Either of these will cause validation to occur. You can check to see if the property Page.IsValid is True or check the individual
    Posted to Web Forms (Forum) by csgeyer@hotmail.com on 7/2/2009
  • Re: accessing datakeys while using repeater

    The problem is that the Repeater control does not expose DataKeys. You are not getting the DataKeys from the Repeater control with the code above. There are alternative solutions, though, such as putting a value in a hidden control and retrieving the "key" value from that control. Here's an example explanation of this solution: http://forums.asp.net/p/1257926/2345904.aspx If you read over that and are still stuck, post more here and we'll try to help you out.
    Posted to Getting Started (Forum) by csgeyer@hotmail.com on 7/2/2009
  • Re: Counting total of all Items displayed in datalist per page

    Hi Jake. If you simply want the number of items in the DataList, use MyDataList.Items.Count. If you're after something else, post a little more information and we'll try to help you with that. For instance, why do you need the count per page? Why are you displaying the items on different pages?
Page 1 of 4 (36 items) 1 2 3 4 Next >