Click here to Skip to main content
15,886,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Cancel Postback of Textbox if it is blank Pin
ToddHileHoffer12-Jun-09 6:42
ToddHileHoffer12-Jun-09 6:42 
Questionhow to see controls from another page in asp.net Pin
LucBite12-Jun-09 3:56
LucBite12-Jun-09 3:56 
AnswerRe: how to see controls from another page in asp.net Pin
Colin Angus Mackay12-Jun-09 4:14
Colin Angus Mackay12-Jun-09 4:14 
General[Message Deleted] Pin
LucBite13-Jun-09 1:47
LucBite13-Jun-09 1:47 
GeneralRe: here is my scenario Collin Pin
LucBite13-Jun-09 2:03
LucBite13-Jun-09 2:03 
AnswerRe: how to see controls from another page in asp.net Pin
Vimalsoft(Pty) Ltd13-Jul-09 3:58
professionalVimalsoft(Pty) Ltd13-Jul-09 3:58 
QuestionIs it possible to kill all events for a control? Pin
thomasa12-Jun-09 3:30
thomasa12-Jun-09 3:30 
QuestionGridView - NullReferenceException Pin
ffowler12-Jun-09 2:39
ffowler12-Jun-09 2:39 
Hello All,

I am stuck on a very simple problem and I at a loss at this point. I have checked the message board but could not find a solution to my particular problem so that is why I am coming to you today.

Here goes:

I have a very simple page with a 2 GridViews and a text box (simple master/detail setup). The first Gridview is bound to an SQLDataSource which runs a simple stored procedure and fills the gridview upon it's first load. The gridview has a Selection link on it which when clicked passes an argument to the second gridview which is then populated with the details of the selected row.

Here's the problem, I want to capture another field of the selected row an show it in a textbox. Simple. Not so (for me anyways). In the Page_Load and SelectedIndexChanged event I simply have

'this.TextBox1.Text = this.GridView1.SelectedRow.Cells[2].Text.ToString();'

The SelectedIndexChanged Event doesn't fire before the postback because I get an error in my Page_Load event that there is a NullReferenceException on the Gridview.

Can someone be kind enough to guide me in the right direction on how to cure this ill.

Greatly appreciated.....FF
AnswerRe: GridView - NullReferenceException Pin
N a v a n e e t h12-Jun-09 2:55
N a v a n e e t h12-Jun-09 2:55 
GeneralRe: GridView - NullReferenceException Pin
ffowler12-Jun-09 3:02
ffowler12-Jun-09 3:02 
AnswerRe: GridView - NullReferenceException Pin
saanj12-Jun-09 3:02
saanj12-Jun-09 3:02 
AnswerRe: GridView - NullReferenceException Pin
Abhijit Jana12-Jun-09 3:06
professionalAbhijit Jana12-Jun-09 3:06 
QuestionTable Controls clear Pin
kanadoss12-Jun-09 2:08
kanadoss12-Jun-09 2:08 
AnswerRe: Table Controls clear Pin
saanj12-Jun-09 2:22
saanj12-Jun-09 2:22 
GeneralRe: Table Controls clear Pin
kanadoss12-Jun-09 2:33
kanadoss12-Jun-09 2:33 
GeneralRe: Table Controls clear Pin
N a v a n e e t h12-Jun-09 2:50
N a v a n e e t h12-Jun-09 2:50 
GeneralRe: Table Controls clear Pin
saanj12-Jun-09 2:53
saanj12-Jun-09 2:53 
QuestionASP.Net Server control Pin
Amit Patel198512-Jun-09 1:55
Amit Patel198512-Jun-09 1:55 
AnswerRe: ASP.Net Server control Pin
saanj12-Jun-09 2:19
saanj12-Jun-09 2:19 
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 

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.