15,902,492 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12119549 (Top 29 by date)
Member 12119549
21-Nov-15 2:39am
View
i know it is ..but what code we write behind it.. here i just got the index ..but
dt.Rows.Remove(dt.Rows(e.RowIndex))
in this line ..how can i make changes?
Member 12119549
18-Nov-15 7:30am
View
yes i am just practicing it by adding values to a grid by datatable.. here's my code..
'creating dataTable
'Dim dt As New DataTable()
Dim dr As DataRow
dt.TableName = "AuthorBooks"
dt.Columns.Add(New DataColumn("AuthorName", GetType(String)))
dt.Columns.Add(New DataColumn("BookName", GetType(String)))
dt.Columns.Add(New DataColumn("BookType", GetType(String)))
dt.Columns.Add(New DataColumn("Publisher", GetType(String)))
dr = dt.NewRow()
dt.Rows.Add(dr)
ViewState("AuthorBooks") = dt
GridView1.DataSource = dt
GridView1.DataBind()
End Sub
Private Sub AddNewRecordRowToGrid()
If ViewState("AuthorBooks") IsNot Nothing Then
Dim dtCurrentTable As DataTable = DirectCast(ViewState("AuthorBooks"), DataTable)
Dim drCurrentRow As DataRow = Nothing
If dtCurrentTable.Rows.Count > 0 Then
For i As Integer = 1 To dtCurrentTable.Rows.Count
drCurrentRow = dtCurrentTable.NewRow()
drCurrentRow("AuthorName") = TextBox1.Text
drCurrentRow("BookName") = TextBox2.Text
drCurrentRow("BookType") = TextBox4.Text
drCurrentRow("Publisher") = TextBox5.Text
Next
If dtCurrentTable.Rows(0)(0).ToString() = "" Then
dtCurrentTable.Rows(0).Delete()
dtCurrentTable.AcceptChanges()
End If
dtCurrentTable.Rows.Add(drCurrentRow)
ViewState("AuthorBooks") = dtCurrentTable
GridView1.DataSource = dtCurrentTable
GridView1.DataBind()
End If
End If
End Sub
Should i iterate through the loop as i have tried it in a list and got succedded.But here i am not able to do as such..that's how i did it in list..
Dim result As Boolean = True
Dim i As Integer
For i = 0 To ListBox1.Items.Count - 1
If VAR3 = ListBox1.Items(i).ToString Then
result = False
End If
Next
If result = False Then
Label1.Text = "Item already exits"
End If
If result = True Then
ListBox1.Items.Add(TextBox1.Text + "" + TextBox2.Text)
End If
Try
Label1.Text = ListBox1.SelectedItem.Text
Catch
Need answers plzzzz.........
Member 12119549
17-Nov-15 1:20am
View
Any help @OriginalGriff sir you always come to my rescue
Member 12119549
16-Nov-15 22:15pm
View
tried it but getting error identifier expected.. :(.. plz get me out of this prb
Member 12119549
16-Nov-15 14:46pm
View
thanks got it
Member 12119549
16-Nov-15 2:07am
View
i am fairly now to this stuff.. your laughter brought me more inspiration :(
Member 12119549
15-Nov-15 8:39am
View
Thanks a bundle for your responce ..so what can i do to iterate through loop.
Member 12119549
14-Nov-15 6:43am
View
any help?
Member 12119549
14-Nov-15 6:24am
View
Any help?
Member 12119549
14-Nov-15 3:55am
View
?
Member 12119549
14-Nov-15 3:10am
View
not allowing me ..i am using a listitem and assigning a textbox.. :( but what else i can do ??
Member 12119549
14-Nov-15 2:48am
View
Dim v1 As ListItem
v1 = TextBox1.Text + "" + TextBox2.Text
If ListBox1.Items.Contains(v1) = True Then
Response.Write("Item exists")
End If
GOT up to this point..why can't i save a value in v1 and access it..is there any way?
Member 12119549
14-Nov-15 2:31am
View
completly stuck :( didnt get you sir
Member 12119549
14-Nov-15 2:22am
View
@Rohit???
Member 12119549
14-Nov-15 2:17am
View
For Each item As var In ListBox1.Items
If item <> TextBox1.Text + "" + TextBox2.Text Then
ListBox1.Items.Add(TextBox1.Text + "" + TextBox2.Text)
End If
Next
i have used it in vb.. its giving be error on var..plz help?
Member 12119549
14-Nov-15 2:08am
View
Thanks for your responce,can you please tell what is var in it..getting error while conveeting it :(
Member 12119549
6-Nov-15 15:11pm
View
Yahooooooooooooooooooooooooooooooooooooooooooooo that "&" works for me... Thanks a bundle @Originial..you really a rock star...!!!!!
Its my first professional work..highly oblieged and appreciated..Thumbs up :)..thank you codeproject too..!!
Member 12119549
6-Nov-15 12:03pm
View
Dim i, j, k As Integer
i = 1
For i = 5 To 1 Step -1
j = 1
For j = 1 To (6 - i)
Response.Write("p")
Next j
k = 1
For k = 1 To i
Response.Write(" * ")
Next k
Response.Write("</br>")
Next i
End Sub
One more thing when i add p i get the required result..
p * * * * *
pp * * * *
ppp * * *
pppp * *
ppppp *
but these p need to be pissed off :(
Member 12119549
6-Nov-15 11:57am
View
Dim i, j, k As Integer
i = 1
For i = 5 To 1 Step -1
j = 1
For j = 1 To (6 - i)
Response.Write("p")
Next j
k = 1
For k = 1 To i
Response.Write(" * ")
Next k
Response.Write("</br>")
Next i
End Sub
One more thing when i add p i get the required result..
p * * * * *
pp * * * *
ppp * * *
pppp * *
ppppp *
but these p need to be pissed off :(
Member 12119549
6-Nov-15 11:52am
View
thank you got up to this point by changing much :(
Dim i, j, k As Integer
i = 1
For i = 5 To 1 Step -1
j = 1
For j = 1 To (6 - i)
Response.Write(" ")
Next j
k = 1
For k = 1 To i
Response.Write(" * ")
Next k
Response.Write("</br>")
Next i
now the only problems i have is that there are no space on the left side to show it like a pyramid :(
--*****--
--****--
---**---
----*--
its getting spaces on the right but why the hell its not on the left sir??
Member 12119549
6-Nov-15 11:20am
View
1 to 5 inclusive .. sorry sir didn't get you on this :(
Member 12119549
6-Nov-15 11:12am
View
used step -1 or i-- not allowing me? griff please help me and become my hero for the night sir ..really stuck
Member 12119549
6-Nov-15 11:06am
View
Your responce is very much appriciated sir..added a spark in me..just need the spaces..working on it..
Member 12119549
6-Nov-15 11:04am
View
Dim i, j As Integer
For i = 1 To 5
For j = 1 To 5
Response.Write("*")
Next
Response.Write("</br>")
Next
i += 1
Yesss ..........!!! succedded in adding a staight liness..now just space remain..
*****
*****
*****
*****
*****
how to add it..?
Member 12119549
6-Nov-15 10:56am
View
Dim i As Integer
For i = 1 To 5
Response.Write("*")
Next
i += 1
printed stars in the first row.. now what can i proceed..plz help..know its childish but need some help..i am not asking for solution,.need clues
Member 12119549
6-Nov-15 10:17am
View
Thanks ..let me try it
Member 12119549
6-Nov-15 10:13am
View
a = 1
For a = 5 To 1 Step -1
b = 1
For b = 1 To 6 - a
Response.Write(" ")
Next b
c = 1
For c = 1 To a
Response.Write(" * ")
Next c
Response.Write("</br>")
Next a
I have used this..but its not giving me space on the right side...
Member 12119549
6-Nov-15 9:30am
View
Anyoneeeeeeeeeee.???????
Member 12119549
6-Nov-15 9:15am
View
No answer...Please can anybody there to help :(
Show More