“Mailbox name not allowed. The server response was: sorry, your mail was administratively denied. (#

VWD 2008 Express.  Visual Basic.  JavaScript.

I have a gridview control that is populated with lesson grades (GradeTextBox) and lesson completion dates (GDateTextBox), both of which are in textboxes.  I want to do the following on the client side:

When a grade is entered or changed in the grade textbox, I want to detect (trap) the change and run some javascript code that automatically updates the lesson completion box.  Since the text control clientIDs are assigned dynamically for each row of the gridview, I also have the problem of determining the clientID for the lesson completion date textbox associated with the grade textbox.  

(1) How do I trap the event of the grade textbox changing?, and

(2) How do I determine the clientID for the lesson completion date textbox associated with the grade that just changed, so that I may automatically set the date?

I have tried adding an “afteredit=” to the grade textbox, but it never reaches the code.  Here is the HTML for the gridview with the two textboxes in red:

                    
                        
                        
                            
                                
                                    
                                    
                                    
                                    
                                
                                
                            
                            
                                
                                    
afteredit="updateGradeDate(this);" >

 

Handle the RowDataBound event of the gridview.  In there you can add an “onchange” attribute to the textbox  in question, and you can send a pointer to this as well as the other textboxes’s ClientID.  This will allow your function to read the value of both textboxes.  Give it a try and post back with any specific questions./

Hi,You need to handle GridView RowDataBound event handler, then you need to add atrributes for textbox  control. Please refer followinghttp://forums.asp.net/p/1565339/3897536.aspxhope this helps

first read this:http://weblogs.asp.net/asptest/archive/2009/01/06/asp-net-4-0-clientid-overview.aspxas a quick solution for now:    function DoSomething(Id){        alert(Id);    }