 |
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

February 27th, 2006, 04:32 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
What do you mean with "get the return value twice "??
Is the event handler SqlStatus_Updated firing twice?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

February 27th, 2006, 05:00 AM
|
Friend of Wrox
|
|
Join Date: Oct 2005
Posts: 173
Thanks: 0
Thanked 2 Times in 1 Post
|
|
HI Imar
I have found the culprit!.. just now.
'Handles SqlGCIStatus.Updated' When I remove this from the event handler it returns the value once but when added I get it twice.
|

February 27th, 2006, 05:04 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
That's probably because you have an OnUpdated handler in the markup for the control as well.
In that case, the handler is hooked up twice, and it'll fire twice...
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

February 27th, 2006, 05:31 AM
|
Friend of Wrox
|
|
Join Date: Oct 2005
Posts: 173
Thanks: 0
Thanked 2 Times in 1 Post
|
|
Excellent, thanks for your help. One last thing if you don't mind..
Within this SELECT CASE statement I want to bind the result to a Label but for some reason it doesn't like it.. page still loads but the label is not showing any text..
Code:
SELECT CASE ReturnStatus
CASE 1
lblalert.Text = "Username Already in Use"
CASE 2
lblalert.Text = "Saved!"
END SELECT
And I declare my Label like so...
Code:
Dim lblalerttext As Label = _
CType(FormView1.FindControl("lblAlertsaved"), Label)
I have checked the value of the 'ReturnStatus' which either show 1 0r 2 (Integer)
Ta
Rit
|

February 27th, 2006, 05:33 AM
|
Friend of Wrox
|
|
Join Date: Oct 2005
Posts: 173
Thanks: 0
Thanked 2 Times in 1 Post
|
|
sorry lblalerttext = lblalert... just in my example above is wrong.
|

February 27th, 2006, 01:47 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Where did you declare the label? Inside a template for the FormView? In that case,is it possible that the selected template is no longer visible after you performed the update? (That is, the Label is defined in the Update section??)
Can't you just add the Label to the page, outside the FormView and directly change its Text?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|

February 28th, 2006, 07:57 AM
|
Friend of Wrox
|
|
Join Date: Oct 2005
Posts: 173
Thanks: 0
Thanked 2 Times in 1 Post
|
|
Blimey it must be like helping a monkey... sorry about that... I have set it in the page and it works fine.
No disrespect to monkeys by the way!
Rit
|

February 28th, 2006, 09:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
No offense taken.... ;)
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |