In a way I can. The problem is, I need to do ALL createQuestion before I do ANY createAnswer.
I can do a temp state :
[code]
dim questionString as string = ""
dim answerString as string = ""
for i = 0 to faqDS.tables(0).rows.count - 1
questionString +=...
Hi,
I am making a faq page and questions and answers are stored in a record of a db.
I have this faqDS, but I can't find a way to avoid looping the ds 2x.
for i = 0 to faqDS.tables(0).rows.count - 1
createQuestion(faqDS.tables(0).rows(i).item("question")
next i
for i = 0 to...
Excellent, thank you very much. I expected
dim times as integer = 2
dim i as integer = 0
for i = 0 to (times - 1)
response.write("i is:" + i.toString + " ")
times -= 1
next i
response.write("<br>")
dim highCount as integer = 5
for i = 0 to highCount
response.write("i is:" + i.toString + "...
Hi all,
I have a for loop that doesn't behave how I expect, and I was hoping someone could explain it for me...
I would expect the following loop to run exactly 1 time
dim times as integer = 2
dim i as integer = 0
for i = 0 to (times - 1)
response.write("i is:" + i.toString + " ")
times...
Thanks for your reply.
Your code showed me an error I consistently make, that string = is case sensitive, and I forget the ToUpper.
Also, for some reason I was obsessed with getting the Request.ServerVariables("PATH_INFO") on the aspx page and passing it to the control via a property. That was...
Thank you very much. I had thought of the Request object, but for some reason I didn't think it would be available at the time my user control was renderd.
"In theory, this is not too difficult"
Yes, but in practice getting a variable value rather than hard coded was a bit more difficult than I...
Hi,
I'm more of an html programer who is trying to leverage asp.net to make my html programing easier and smarter, so I don't fully understand the .net paradigm yet. I have a design question, and I would like some opinions on it.
Let me try and set the situation. I have a nav on the left side...
I think your onItemCreated is not being called. Did you wire it in your asp code like
<asp:datagrid onitemcreated = "myitemcreated">
I know thats not what I gave you at first, sorry, I'm doing it a bit different and forgot to take that into account.
Jeez I'm a dolt.
I want to make the following code more efficient:
i = 0
For Each Item As ListItem In eventDL.Items
If Item.Text = "asdf" Then
eventDL.SelectedIndex = i
End If
i...
Also, you might have to do it in another event handler:
OnItemCreated(ByVal e As DataGridItemEventArgs)
MyBase.OnItemCreated(e)
Dim i As Integer
Select Case e.Item.ItemType
Case ListItemType.EditItem
The datagrid might not have created the edititem control...
Hi all, I have a dropdownlist that I populate like this
eventDL.DataSource = sqlSelect("Select * from [event]")
eventDL.DataTextField = "eventName"
eventDL.DataValueField = "pk_Event"
My problem is I want to set the selected index based on the...
Thank you for your reply, that would work just fine.
However, I found a different way to do it. I called attributes.add during the datagrid.load event, and by then the ClientId was what I expected
DG_Loaded(ByVal sender As Object, ByVal e As EventArgs)
Dim addButton as Button =...
Sure, I understand that, but I am trying to check for the instance where the user never enters the TB at all, they just skip over it and click the add button.
Edit:
Actually, I didn't read quite close enough, as the onclick event will never fire. That is the check I am trying to do, I want to make sure the user entered some text.
I like the idea though, and will try to apply it in some other way.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.