doject beginner 0 Report post Posted April 2, 2014 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 Quote Share this post Link to post Share on other sites
umarzuki 78 Report post Posted April 5, 2014 rasanya artikel kat -> http://www.codeproject.com/Articles/32545/Exploring-Session-in-ASP-Netada info lagi detail Quote Share this post Link to post Share on other sites
Chuki2 32 Report post Posted April 7, 2014 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 Quote Share this post Link to post Share on other sites
doject beginner 0 Report post Posted April 14, 2014 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: indexSource 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 Quote Share this post Link to post Share on other sites
Chuki2 32 Report post Posted April 14, 2014 (edited) 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: indexSource 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. 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 April 14, 2014 by Chuki2 Quote Share this post Link to post Share on other sites