Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:800983
More Search Options
RSS Available
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
Posted to
Data Presentation Controls
(Forum)
by
csgeyer@hotmail.com
on 7/7/2009
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.
Posted to
Data Presentation Controls
(Forum)
by
csgeyer@hotmail.com
on 7/7/2009
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
Posted to
Data Presentation Controls
(Forum)
by
csgeyer@hotmail.com
on 7/7/2009
Re: Need help getting DropDownList selection displayed in FormView
papabear - thanks for sharing the cred bro. Joel can mark both as answer!!
Posted to
Data Presentation Controls
(Forum)
by
csgeyer@hotmail.com
on 7/7/2009
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).
Posted to
Data Access and ObjectDataSource Control
(Forum)
by
csgeyer@hotmail.com
on 7/7/2009
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?
Posted to
Data Presentation Controls
(Forum)
by
csgeyer@hotmail.com
on 7/1/2009
Page 1 of 4 (36 items) 1
2
3
4
Next >
Channel 9:
Ping 42: Is Microsoft cool? Photo DNA, Win7 tool, 10k MIX contest
Channel 9:
Jafar Husain: Silverlight Toolkit and Rx, Part 1
Channel 9:
Francesco Logozzo - Static Checking with Code Contracts for .NET
Channel 9:
Channel 9 Live at PDC09: Doug McCuistion, NASA
TechNet Edge:
System Center Operations Manager 2007 R2 – Service Level Dashboard part 3: Configuration
Channel 9:
Reading Debate with Bill Buxton
Channel 10:
Reading Debate with Bill Buxton
WindowsClient:
Build WPF Data Controls for Outlook Addins Easily with VS2010
Channel 9:
Channel 9 Live at PDC09: .Net Rocks Part 2
Channel 9:
Channel 9 Live at PDC09: .Net Rocks Part 1
Channel 9:
Channel 9 Live at PDC09: Wei Zhu (Facebook)
WindowsClient:
WPF Manipulation Basics
ASP.NET:
High CPU in .NET app using a static Generic.Dictionary
TechNet Edge:
Deploying Silverlight - Why and How
WindowsClient:
Windows Client Developer Roundup for 12/21/2009
IIS.NET:
SiteShell
Silverlight:
4 Calendars & Plans for 2010 / 5770
ASP.NET:
ASP.NET MVC 2 and Visual Studio 2010
ASP.NET:
Moving your ASP.NET Application to Windows Azure – Part II
Silverlight:
HVP – Core Scaffolding and Updated News
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online