|
thedom2 wrote: objDT = Session("Cart")
You should check the session is null before assigning to an object. Session will be null, so object won't get reference and throws the specified exception.
|
|
|
|
|
why did it work when there was no code behind form ?
|
|
|
|
|
thedom2 wrote: why did it work when there was no code behind form ?
Means ? It won't work until your session contains a valid DataTable object with rows.
|
|
|
|
|
but the code remains the same from the example on the website the only difference is i have incorporated a code behind file ? so i dont quite understand why it works when there is no code-behind ????
|
|
|
|
|
thedom2 wrote: so i dont quite understand why it works when there is no code-behind ????
See this is not the matter you have code behind or not. I reiterate, it's the problem of session's NULL value. So check session is NULL before proceeding. By the way, where you are assigning value to the session ? I have seen you are assigning value to session after you refer it. To refer a value from session, it needs to be created before
|
|
|
|
|
can you show me please if possible ?
thank you
|
|
|
|
|
Well, you can check NULL in session like
if ( Session["cart"] != NULL )
else
It's a c# code, you can convert into VB.NET, Let me know if it helps
|
|
|
|
|
thanks for youre help sorry for all questions
|
|
|
|
|
|
I have a grid view which contains three columns
1. checkbox
2.Bound Field1
3. BoundField2
what I need is
when I check the checkbox , then BoundField2 in that row should be editable.
|
|
|
|
|
Is it possible to iterate through the items in a GridView using
JavaScript on the client?
Thanks
|
|
|
|
|
Well, a gridview does not exist on the client, it's a table. Yes, you can iterate over it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian. When I try to do this, it says gridView does not exist.
Am I wrong here?
var Table = document.getElementById(gridViewId);
for(i=0; i< Table.rows.length; i++ )
{
}
I have gridView inside the Panel like below. Do you think it fails because Gridview is inside Panel and table?
<asp:Panel ID="PanelGrid" runat="server" Visible="true">
<table>
<tr> <td> <asp:GridView> </asp:GridView> </td> </tr>
</table>
</asp:Panel>
Thanks
|
|
|
|
|
It depends, what is gridViewId ? The id you assign on the server is not the one used on the client. You need to do something like
var gridViewId = '<%=gridview.ClientID%.';
to create the variable you use to find the element by it's id.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi
how can i define a big field in sql that could keep a text with for example 10,000 characters?
thank you.
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Use text or ntext data type for the field.
|
|
|
|
|
oh no my friend's
you can't define a ntext or text field with more 4000 bytes
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
mr.mohsen wrote: you can't define a ntext or text field with more 4000 bytes
You are mistaken.
The limit for text is 2147483647 characters.
The limit for ntext is 1073741823 characters.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Yes you can. Check the documentation[^].
mr.mohsen wrote: nobody help you...
you have to help you yourself
and this is success way.
Kind of ironic, seeing as you didn't bother to check yourself before posting.
Paul Marfleet
|
|
|
|
|
How can we fully disable the autocomplete feature of browsers for our site ? I mean how to prevent browsers from remembering textbox values.
|
|
|
|
|
When a .net web site starts up, does it load the web.config into memory and just refer to/use that copy, or does it always reload it from disk to retrieve the desired setting?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I believe it uses a file watcher to notice when the file is changed, and thus reload it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How does one setup an encrypted web.config in the IDE?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Dear.....
i have a page in asp.net. there is a dropdownlist and there are many buttons for other other work like calander selection etc.
but there is a button for submition of selected item from the dropdownlist. problem is that, first i select one items from dropdownlist and when i press any button then page goes to postback and selected item of the dropdownlist goes to initial position. so what can i do for that???
Please help me...
Adv thanks....
yogesh
|
|
|
|