|
Hi, I am trying to put a data in a label but it gives me this error 'Object reference not set to an instance of an object', here is what I am trying to do: Label1.Text= GridView1.SelectedRow.Cells[0].FindControl("Status").ToString();
Any help how should I solve this bug? Thx
|
|
|
|
|
Your debugger should be helping you. Any of the following can be null.
1) Label1 (if you had missed the runat="server" in the ASP(C)X page).
2) GridView1.SelectedRow.Cells[0].FindControl("Status") returned NULL.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
label1 is running at server normally, and I am loading the gridview normally, but when I want to select the data in the first cell, I cannot do that. Is that the proper declaration?
|
|
|
|
|
This is terrible code.
laziale wrote: Label1.Text= GridView1.SelectedRow.Cells[0].FindControl("Status").ToString();
1 - are you serious with these variable names ?
2 - The places this can throw an exception are:
SelectedRow can be null
SelectedRow can have no cells
FindControl can return null
You need to write code that checks these things before assuming they have succeeded. Then you can see which part is failing, and work out why
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hai Friends.
I need to freeze the first column of the scrolling datagrid.
|
|
|
|
|
|
hai
Allready I've used this code in the style sheet but I download the scrolling datagrid sample project then I include the code but I've got a
left: expression(document.getElementById("div-datagrid").scrollLeft-2);
|
|
|
|
|
Did you try having a look at the article's messageboard?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Dear all,
how to send a Email message using Asp.Net over Internet,
i have a input as Mail TO Address, Mail From address, Server IP and Message to be send.
Any code sample to do this.
Please help...
Regards
Koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hint: System.Net.Mail
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
i have used the same but it gives me message "Transfer failed to connect the server"
what it mean ???
how can i clear it ???
thankx in advance
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
If you are still on .NET 1.1, check this[^]. For .NET 2.0 or later, check this[^]
|
|
|
|
|
N a v a n e e t h wrote: on .NET 1.1, check this[^].
Isn't it http://www.systemwebmail.com[^]? You mentioned it as systemwebmail.net in the original post.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
But it woks, have you tried ?
|
|
|
|
|
May be they have booked both domains for the web server. We have a cursed proxy solution that allows access to URLs that it has in its catalog.
Thanks for the update anyway.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I wrote this[^], just for you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how to trag and drop a column in the Scrolling DataGrid during the runtime using ASP.net with c# code
|
|
|
|
|
|
Hai!
I,ve Copy the JavaScript Code but Still not working Scrolling Datagrid.
But I've Download the sample Drag and Drop demo Sample project at the runtime got a error from the web config file.
|
|
|
|
|
Whats the error?
We are not a Code Charity
|
|
|
|
|
EzhilarasiMSc wrote: at the runtime got a error from
Can you mention the error? Also, if it an article-related query, a quick posting in the article's messageboard would elicit faster responses.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
hai.
here I mention the error on the Drag and drop demo project
Could not load type 'DrawingWebApp.RetrieveImage'.
Could not load type 'DrawingWebApp.SpecStorage'.
|
|
|
|
|
Is the project built? The necessary assemblies should be in the bin folder and the folder and its associated virtual directory must be marked as an application in IIS.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi! I want to get the row from a table and put in a label. Any clue how this can be solved. Like let's say I have a table with 3 rows, and I want to assign the values from a table to 3 labels
|
|
|
|
|
If you always want to use the same row or automatically determine which row you can use the grid's OnItemDataBound event and the eventArgs parameter will have a reference to the current row, e.Item.Cells[x].Text will get you the value in one cell...or if the cells are named (i.e. not just boundcolumns) you can use e.item.FindControl("name") and get the value that way, but you'll have to cast that to the correct type.
you can also use a button on the form and put your code in the itemCommand event, so the user can pick which row, agin the EventArgs paramter will contain a refernce to the row the clicked button was in.
Hope you found that helpful, Please rate helpful responses, lets us know we're actually giving good answers.
|
|
|
|