Jump to content

Recommended Posts

Salam... camner nak create session dalam asp.net n vb.net...

 

saya beginner dalam asp.net n vb.net...

 

 

satu lagi camner nak panggil database menggunakan dropdown list n set array

 

Wasalam, untuk create session dalam VB mudah sahaja.

 

Contoh :

 

Session("user") = "Chuki2"

Session.Remove("user")

 

Regards

Share this post


Link to post
Share on other sites

tq 4 ur info :)

 

kenapa error ni kerap blaku ?

 

Server Error in '/' Application. Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error: 
 

Line 30: 'Dim studentName1 As String = DetailsView1.Rows(0).Cells(1).Text Line 31: ' MsgBox (customer_id ) Line 32: Dim oper1 As String = DetailsView1.Rows(0).Cells(1).Text Line 33: Session("u_id") = Request.QueryString("u_id") Line 34: Session("u_id") = oper1

Share this post


Link to post
Share on other sites

 

tq 4 ur info :)

 

kenapa error ni kerap blaku ?

 

Server Error in '/' Application. Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:

Dim studentName1 As String = DetailsView1.Rows(0).Cells(1)
MsgBox (customer_id ) 
Dim oper1 As String = DetailsView1.Rows(0).Cells(1).Text 
Session("u_id") = Request.QueryString("u_id")
Session("u_id") = oper1

Error ini terjadi apabila anda cuba akses index location yang tiada didalam collection. Katakan didalam collection gridview untuk column ada 5. Jadi index bermula dari 0 - 4. Tetapi sekiranya anda cuba akses index 5, anda akan dapat error seperti itu. Sila lihat gambar rajah dibawah.

 

 

N9Ma1.jpg

 

Contohnya, anda mempunyai 3 biji epal tetapi saya nak mintak epal ke 4. Jadi anda akan beritahu pada saya bahawasanya awak ada 3 biji epal sahaja. Sama juga pada asp.net lakukan. ;)

 

Boleh bagi full source code untuk page ini? Saya nak tengok macam mana anda generate data dan masukkan kedalam gridview.

 

Regards.. :D

Edited by Chuki2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...