Solved

Communication Between .vb File and .aspx File

Posted on 2008-10-09
6
193 Views
Last Modified: 2013-11-05
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.
0
Comment
Question by:Kim Neesgaard
  • 4
  • 2
6 Comments
 
LVL 18

Accepted Solution

by:
David Robitaille earned 250 total points
ID: 22678613
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
 

Author Comment

by:Kim Neesgaard
ID: 22685598
Hi!

This is EXACTLY what I was looking for - THANK YOU! I have tested it and it works perfectly!
0
 

Author Comment

by:Kim Neesgaard
ID: 22685608
Nothing more to add.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:David Robitaille
ID: 22686220
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
 

Author Comment

by:Kim Neesgaard
ID: 22686266
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
 

Author Closing Comment

by:Kim Neesgaard
ID: 31504562
Now I hope things is done the right way! Thanks one more time.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now