本は、テキスト部分と質問部からビルドしています。
質問に対するすべての回答は、テキストとユーザーが正しい回答をクリックする必要があります。 彼が右なら単語が緑色になり、間違っていれば赤色に変わります。
私はこれにlinkbuttonを使用していますが、私はそれがなく "リンク"スタイルである必要があります。
私は質問の一部にこのコードを使用:
public class question
{
public void createQusetion(Panel leftside, string text, string question,string answer)
{
string[] Qbuttonstext = text.Split(' ');
for (int i = 0; i < Qbuttonstext.Length; i++)
{
LinkButton answerButton = new LinkButton();
if (Qbuttonstext[i] == answer)
{
answerButton.ID = "answer";
}
else
{
answerButton.ID = "word" + i.ToString();
}
answerButton.Text = Qbuttonstext[i].ToString()+" ";
answerButton.CssClass = "textbuttonB4";
answerButton.Click += new EventHandler(checkAnswer);
leftside.Controls.Add(answerButton);
}
}
}
私はCSSスタイルシートを使用してこのコードを使用:
.textbuttonB4 a:link
{
style:none;
color:Black;
font-size:18px;
border-bottom-style:none;
background-color:transparent;
text-decoration: none;
}
.textbuttonB4 a:hover
{
style:none;
color:Black;
font-size:18px;
border-bottom-style:none;
background-color:transparent;
text-decoration: none;
}
.textbuttonB4 a:visited
{
style:none;
color:Black;
font-size:18px;
border-bottom-style:none;
background-color:transparent;
text-decoration: none;
}
テキストを実行しているコードはまだリンクとして表示されているとき。
解決策のためにウェブを探した後に、なぜそれが動作しないのですか?
この質問の前のバージョンをお詫び申し上げます。
asaf
あなたの質問は、あなたがどのツールを使用しているのかを説明することはありません。また、「何らかの理由でそれがうまくいかない」と私たちには何も言えません。 –
私はNathanに同意します。テストケースを追加するか、詳細をお知らせください。 –
申し訳ありませんが、私は質問を変更しました。 ありがとう –