can you tell me what is wrong with my code?
// my codes in Page_Load
If Not Page.IsPostBack Then
Dim selectStr As String = "SELECT TOP 50 * FROM Questions ORDER By NEWID()"
Dim selectCom As New SqlCommand(selectStr, strConn)
strConn.Open()
reader = selectCom.ExecuteReader()
For i As Integer = 1 To 50
createQns()
Next
End If
// CreateQns()
Sub createQns()
Dim lbl As NewLabel()
Dim qns As New Literal()
qns.Text = "" + reader.GetString(1) + "" lbl.Controls.Add(qns) form2.Controls.Add(lbl)
End Sub
Question: When i press Refresh button, it go ahead and create a new select sqlCommand which shouldn't be the case because of Page.Ispostback() or did i assume Refresh button does a postback???
...
Go to the complete details ...