さて、私はこの ASP.NET SHYTE をやめようとしています.. ;( 私は通常、クライアントをコーディングしますが、すべてが非常に簡単です.. しかし、これは!?!
どれだけ多くの問題を解決しなければならないかわかりません... とにかく、PARSER ERROR, SERVER TAG NOT WELL FORMED が表示されます。
私は数時間ネットを検索してきましたが、私が見つけたヒントは、一重引用符を使いすぎて、プログラマーとして引退することを教えてくれました...
データベースから取得したデータを使用して、ラジオボタンのグループを表示しようとしています。
コードビハインドは次のようになります。
protected void fillRepeater()
{
MySqlConnection con = new MySqlConnection(@"Server=hide.my.url;Database=no_database;Uid=topsecretuser;Pwd=topsecret");
con.Open();
//ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + con.State + "');", true);
string sqlQ = "Select * from t_domains";
MySqlCommand myCommand = new MySqlCommand(sqlQ, con);
MySqlDataReader dataReader = myCommand.ExecuteReader();
Repeater1.DataSource = dataReader;
Repeater1.DataBind();
con.Close();
}
これは私の HTML です。私はテーブルの行/セルをまだ実装していません..(思い出させないでください);)
Repeater data!<br />
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table>
</HeaderTemplate>
<ItemTemplate>
<asp:RadioButton id="RadioButton1" runat="server" GroupName="<%#DataBinder.Eval(Container.DataItem, "idtag_domain") %>" value="50" Text="Free access" onclick="calculatePrice();disableTB(this.name);" />
<br />
<asp:RadioButton id="RadioButton2" GroupName="<%#DataBinder.Eval(Container.DataItem, "idtag_domain") %>"
Text="Once a day(30/month)" value="25" onclick="calculatePrice();disableTB(this.name);" />
<br />
<asp:RadioButton id="RadioButton3" GroupName="<%#DataBinder.Eval(Container.DataItem, "idtag_domain") %>" value="0"
Text="Enter number of articles" onclick="enableTB(this.name, this.checked)" />
<br />
<asp:TextBox ID="textbox" name="<%#DataBinder.Eval(Container.DataItem, "idtag_domain") %>" Enabled="false" Width="106px"
onkeyup="calculatePrice()" style="background-color:#eeeeee" ></asp:TextBox>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
ERROR IT GIVES ME パーサー エラー メッセージ: サーバー タグの形式が正しくありません。
ソース エラー:
Line 36: <asp:RadioButton id="RadioButton1" runat="server" GroupName=" <%#DataBinder.Eval(Container.DataItem, "idtag_domain") %>" value="50" Text="Free access" onclick="calculatePrice();disableTB(this.name);" />