Advertisement
Advertisement
| 02.11.2008 at 12:21PM PST, ID: 23154233 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: |
default.aspx
<%@ Page Language="C#" AutoEventWireup="false" Codebehind="default.aspx.cs" Inherits="SmartQueryXML._default" ValidateRequest="false" %>
<asp:DropDownList ID="ddStates" runat="server" OnSelectedIndexChanged="ddStates_SelectedIndexChanged" AutoPostBack="True" Width="150px"></asp:DropDownList>
<asp:DropDownList ID="ddCounties" runat="server" Width="150px" OnSelectedIndexChanged="ddCounties_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>
=================================================
default.aspx.cs
protected void ddStates_SelectedIndexChanged(object sender, EventArgs e) {
string ErrorMessage = "";
string state = ddStates.SelectedItem.Value;
// This doesn't work
DataSet ds = new DataSet();
ds = Helper.GetCounties(state, "%%", ref ErrorMessage);
ddCounties.Items.Clear();
ddCounties.Items.Add(new ListItem("Choose a County", ""));
foreach(DataRow dr in ds.Tables[0].Rows) {
ddCounties.Items.Add(new ListItem(dr["Name"].ToString(), state));
}
// This works
//DataSet ds = new DataSet("Jurisdiction");
//FileStream fs = new FileStream(Server.MapPath("Jurisdiction.xml"), FileMode.Open, FileAccess.Read);
//StreamReader sr = new StreamReader(fs);
//ds.ReadXml(sr);
//fs.Close();
//DataView dv = new DataView(ds.Tables[0]);
//dv.Table = ds.Tables[0];
//dv.RowFilter = "State = '" + state + "'";
//ddCounties.DataSource = dv;
//ddCounties.DataMember = "jurisdiction";
//ddCounties.DataTextField = "county";
//ddCounties.DataValueField = "county";
//ddCounties.DataBind();
}
protected void ddCounties_SelectedIndexChanged(object sender, EventArgs e) {
// Reset inputs when user selects a county
// Clean slate.
string county = ddCounties.SelectedItem.Value;
}
|