Click here to Skip to main content
15,893,668 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ASP.Net Server control Pin
Abhijit Jana12-Jun-09 3:20
professionalAbhijit Jana12-Jun-09 3:20 
QuestionGenerating word document and saving to a particular location in c#.net Pin
YazhiniP12-Jun-09 1:04
YazhiniP12-Jun-09 1:04 
AnswerRe: Generating word document and saving to a particular location in c#.net Pin
Christian Graus12-Jun-09 1:15
protectorChristian Graus12-Jun-09 1:15 
AnswerRe: Generating word document and saving to a particular location in c#.net Pin
YazhiniP12-Jun-09 1:47
YazhiniP12-Jun-09 1:47 
Questionerror is \\The parameterized query '(@img_type nvarchar(4000),@img_stream nvarchar(4000))INSERT INTO' expects the parameter '@img_type', which was not supplied. Pin
jigneshp2512-Jun-09 1:03
jigneshp2512-Jun-09 1:03 
AnswerRe: error is \\The parameterized query '(@img_type nvarchar(4000),@img_stream nvarchar(4000))INSERT INTO' expects the parameter '@img_type', which was not supplied. Pin
Christian Graus12-Jun-09 1:16
protectorChristian Graus12-Jun-09 1:16 
AnswerRe: error is \\The parameterized query '(@img_type nvarchar(4000),@img_stream nvarchar(4000))INSERT INTO' expects the parameter '@img_type', which was not supplied. Pin
Abhijit Jana12-Jun-09 1:20
professionalAbhijit Jana12-Jun-09 1:20 
QuestionObject reference not set to an instance of an object. (Use the New keyword to create object instance) Pin
KhandelwalA12-Jun-09 0:56
KhandelwalA12-Jun-09 0:56 
Hello........I m decveloping an application in which i hav to create data table dynamically......i hav written the code the but getting the error....plz help me...code is below:-

Dim objDT As New System.Data.DataTable
Dim objDR As System.Data.DataRow

Private Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)
If Not IsPostBack Then
makeCart()
End If
End Sub

Function makeCart()
objDT = New System.Data.DataTable("Cart")
objDT.Columns.Add("ID", GetType(Integer))
objDT.Columns("ID").AutoIncrement = True
objDT.Columns("ID").AutoIncrementSeed = 1
objDT.Columns.Add("Quantity", GetType(Integer))
objDT.Columns.Add("Product", GetType(String))
objDT.Columns.Add("Cost", GetType(Decimal))
Session("Cart") = objDT
End Function

Sub Delete_Item(ByVal s As Object, ByVal e As DataGridCommandEventArgs)
objDT = Session("Cart")
objDT.Rows(e.Item.ItemIndex).Delete()
Session("Cart") = objDT
dg.DataSource = objDT
dg.DataBind()
lblTotal.Text = "$" & GetItemTotal()
End Sub
Sub AddToCart(ByVal s As Object, ByVal e As EventArgs)
objDT = Session("Cart")
Dim Product = ddlProducts.SelectedItem.Text

objDR = objDT.NewRow(GETTING ERROR IN THIS LINE)
'Error is same which is written in Subject line
objDR("Quantity") = txtQuantity.Text
objDR("Product") = ddlProducts.SelectedItem.Text
objDR("Cost") = Decimal.Parse(ddlProducts.SelectedItem.Value)
objDT.Rows.Add(objDR)
Session("Cart") = objDT
dg.DataSource = objDT
dg.DataBind()

Dim blnMatch As Boolean = False
For Each Me.objDR In objDT.Rows
If objDR("Product") = Product Then
objDR("Quantity") += txtQuantity.Text
blnMatch = True
Exit For
End If
Next
If Not blnMatch Then
objDR = objDT.NewRow
objDR("Quantity") = Int32.Parse(txtQuantity.Text)
objDR("Product") = ddlProducts.SelectedItem.Text
objDR("Cost") = Decimal.Parse(ddlProducts.SelectedItem.Value)
objDT.Rows.Add(objDR)
End If
lblTotal.Text = "$" & GetItemTotal()

End Sub

Function GetItemTotal() As Decimal
Dim intCounter As Integer
Dim decRunningTotal As Decimal
For intCounter = 0 To objDT.Rows.Count - -1
objDR = objDT.Rows(intCounter)
decRunningTotal += (objDR("Cost") * objDR("Quantity"))
Next
Return decRunningTotal
End Function
</script>
AnswerRe: Object reference not set to an instance of an object. (Use the New keyword to create object instance) Pin
Christian Graus12-Jun-09 1:17
protectorChristian Graus12-Jun-09 1:17 
AnswerRe: Object reference not set to an instance of an object. (Use the New keyword to create object instance) Pin
saanj12-Jun-09 1:25
saanj12-Jun-09 1:25 
AnswerRe: Object reference not set to an instance of an object. (Use the New keyword to create object instance) Pin
Abhijit Jana12-Jun-09 1:40
professionalAbhijit Jana12-Jun-09 1:40 
QuestionHow to Add the BindingManager to the tool box in asp.net if we can Pin
govindi unal11-Jun-09 23:26
govindi unal11-Jun-09 23:26 
QuestionMost Visited Pin
Ramkumar_S11-Jun-09 23:24
Ramkumar_S11-Jun-09 23:24 
AnswerRe: Most Visited Pin
Christian Graus11-Jun-09 23:45
protectorChristian Graus11-Jun-09 23:45 
AnswerRe: Most Visited Pin
saanj12-Jun-09 0:20
saanj12-Jun-09 0:20 
AnswerRe: Most Visited Pin
Colin Angus Mackay12-Jun-09 0:39
Colin Angus Mackay12-Jun-09 0:39 
Questionproblem in alert Pin
janani1311-Jun-09 21:39
janani1311-Jun-09 21:39 
AnswerRe: problem in alert Pin
Aman Bhullar11-Jun-09 21:40
Aman Bhullar11-Jun-09 21:40 
AnswerRe: problem in alert Pin
Blue_Boy11-Jun-09 21:54
Blue_Boy11-Jun-09 21:54 
GeneralRe: problem in alert Pin
janani1311-Jun-09 22:01
janani1311-Jun-09 22:01 
GeneralRe: problem in alert Pin
Blue_Boy11-Jun-09 22:14
Blue_Boy11-Jun-09 22:14 
GeneralRe: problem in alert Pin
janani1311-Jun-09 23:05
janani1311-Jun-09 23:05 
GeneralRe: problem in alert Pin
Christian Graus11-Jun-09 23:45
protectorChristian Graus11-Jun-09 23:45 
GeneralRe: problem in alert Pin
janani1312-Jun-09 0:06
janani1312-Jun-09 0:06 
GeneralRe: problem in alert Pin
Aman Bhullar12-Jun-09 0:19
Aman Bhullar12-Jun-09 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.