Communication Between .vb File and .aspx File

I have a GridView on an .aspx form and the content is controlled by an ObjectDataSource. The actual table update takes place in a .vb file. My question is now: how can I communicate a situation in the .vb file (e.g. no records found, missing update etc.) to the user of the .aspx file? In case of an error found in the .vb file, I want to put a message to the user in e.g. a label on the .aspx file.
Kim NeesgaardAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
David RobitailleConnect With a Mentor Analyst ProgrammerCommented:
Usualy i raise Application exception (using Throw New ApplicationException("text")) and than catch it in the RowUpdated of the grid view
 here all my inspirations:
http://www.asp.net/learn/data-access/tutorial-18-vb.aspx
0
 
Kim NeesgaardAuthor Commented:
Hi!

This is EXACTLY what I was looking for - THANK YOU! I have tested it and it works perfectly!
0
 
Kim NeesgaardAuthor Commented:
Nothing more to add.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
David RobitailleAnalyst ProgrammerCommented:
Well, I could just wait that the question to be close, but I think you should select my comment as the solution instead of your comment and mine as the assisted solution.
0
 
Kim NeesgaardAuthor Commented:
I am new to EE and sorry if I have done something wrong! Of course your solution must be selected - it help me a lot. I will try to make it correct.
0
 
Kim NeesgaardAuthor Commented:
Now I hope things is done the right way! Thanks one more time.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.