![]() |
|
|
|
#1 |
|
Hi all,
Recently i have updated my vs.net 2003 project to vs.net 2005 and i have successfully converted my code and found no problem with all my controls except the one which is the linkbutton. I have added the linkbutton control in my datagrid and it rendered perfectly but whenever i clicked the linkbutton am getting this error 'event' is null or not an object. I have checked with all the possibilities like using aspnet_regiis -i and aspnet_regiis -c etc., and all my other controls like button, hyperlink and all my javascripts work fine. I have used Scott Mitchell's skmlinkbutton, so i thought that would be having some problem, so i removed that control and put microsoft's built in linkbutton control and for my surprise am getting the same error. i checked with the rendered javascript function which is in the following format. javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("dgScreenDetails:_ctl6:nln Delete", "", true, "", "", false, true)) i didnt understand what this script says(i mean parameters) and i compared with some other script and found the target page is not rendered. but still i couldnt able to find out the exact reason for this error. can anyone please do help to solve this issue coz my whole project got stuck because of this simple javascript error. Microsoft guys please do help me!. Thanks in advance, Shiva. Shivakumar |
|
|
|
|
#2 |
|
Posts: n/a
|
Are you running the Item event of the datagrid using a CommandName or the
click event on the link button? One trouble shooting step could be re-adding the link button. -- Jay Douglas http://www.jaydouglas.com "Shivakumar" <> wrote in message news:%... > Hi all, > Recently i have updated my vs.net 2003 project to vs.net 2005 and i > have successfully converted my code and found no problem with all my > controls except the one which is the linkbutton. > > I have added the linkbutton control in my datagrid and it rendered > perfectly but whenever i clicked the linkbutton am getting this error > > 'event' is null or not an object. > > I have checked with all the possibilities like using aspnet_regiis -i and > aspnet_regiis -c etc., and all my other controls like button, hyperlink > and all my javascripts work fine. > > I have used Scott Mitchell's skmlinkbutton, so i thought that would be > having some problem, so i removed that control and put microsoft's built > in linkbutton control and for my surprise am getting the same error. i > checked with the rendered javascript function which is in the following > format. > > > javascript:WebForm_DoPostBackWithOptions(new > WebForm_PostBackOptions("dgScreenDetails:_ctl6:nln Delete", "", true, "", > "", false, true)) > > i didnt understand what this script says(i mean parameters) and i compared > with some other script and found the target page is not rendered. but > still i couldnt able to find out the exact reason for this error. can > anyone please do help to solve this issue coz my whole project got stuck > because of this simple javascript error. > > Microsoft guys please do help me!. > > Thanks in advance, > Shiva. > > Jay Douglas |
|
|
|
#3 |
|
Posts: n/a
|
jay,
Am using the command name of the datagrid. <asp:LinkButton runat="server" ForeColor="#FF6633" Text='Publish' ID="Linkbutton1" NAME="Label1" CommandName="Edit" CommandArgument='<%# GetURL(Container,"Publish") %>'></asp:LinkButton> GetURL has the following -------------------------- case "Publish": if( (DataBinder.Eval(Container, "DataItem.StatusCode")).ToString()=="100") URL="Publish"+"|"+DataBinder.Eval(Container, "DataItem.ModuleID"); break; and the edit command has the following code. ------------------------------------------------ protected void dgScreenDetails_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { string splitString = e.CommandArgument.ToString(); string[] arrCommandArgument = splitString.Split('|'); if (arrCommandArgument[0].ToString() == "Publish") { ModuleListingGeneralFunctions.PublishModule(arrCom mandArgument[1].ToString()); BindDataToGrid(); } } NB: this code works fine when run in the local machine but throws javascript error only when accessed from some other machine Regards, Shiva. "Jay Douglas" <> wrote in message news:... > Are you running the Item event of the datagrid using a CommandName or the > click event on the link button? > > One trouble shooting step could be re-adding the link button. > > -- > Jay Douglas > http://www.jaydouglas.com > > > "Shivakumar" <> wrote in message > news:%... >> Hi all, >> Recently i have updated my vs.net 2003 project to vs.net 2005 and i >> have successfully converted my code and found no problem with all my >> controls except the one which is the linkbutton. >> >> I have added the linkbutton control in my datagrid and it rendered >> perfectly but whenever i clicked the linkbutton am getting this error >> >> 'event' is null or not an object. >> >> I have checked with all the possibilities like using aspnet_regiis -i and >> aspnet_regiis -c etc., and all my other controls like button, hyperlink >> and all my javascripts work fine. >> >> I have used Scott Mitchell's skmlinkbutton, so i thought that would be >> having some problem, so i removed that control and put microsoft's built >> in linkbutton control and for my surprise am getting the same error. i >> checked with the rendered javascript function which is in the following >> format. >> >> >> javascript:WebForm_DoPostBackWithOptions(new >> WebForm_PostBackOptions("dgScreenDetails:_ctl6:nln Delete", "", true, "", >> "", false, true)) >> >> i didnt understand what this script says(i mean parameters) and i >> compared with some other script and found the target page is not >> rendered. but still i couldnt able to find out the exact reason for this >> error. can anyone please do help to solve this issue coz my whole project >> got stuck because of this simple javascript error. >> >> Microsoft guys please do help me!. >> >> Thanks in advance, >> Shiva. >> >> > > Shivakumar |
|
|
|
#4 |
|
Posts: n/a
|
Does the /wwwroot folder have the 2.0 aspnet_client javascript?
-- Jay Douglas http://www.jaydouglas.com "Shivakumar" <> wrote in message news:u$... > jay, > Am using the command name of the datagrid. > <asp:LinkButton runat="server" ForeColor="#FF6633" Text='Publish' > ID="Linkbutton1" NAME="Label1" CommandName="Edit" CommandArgument='<%# > GetURL(Container,"Publish") %>'></asp:LinkButton> > > GetURL has the following > -------------------------- > case "Publish": > > if( (DataBinder.Eval(Container, "DataItem.StatusCode")).ToString()=="100") > > URL="Publish"+"|"+DataBinder.Eval(Container, "DataItem.ModuleID"); > > break; > > > and the edit command has the following code. > ------------------------------------------------ > protected void dgScreenDetails_EditCommand(object source, > System.Web.UI.WebControls.DataGridCommandEventArgs e) > > { > > string splitString = e.CommandArgument.ToString(); > > string[] arrCommandArgument = splitString.Split('|'); > > if (arrCommandArgument[0].ToString() == "Publish") > > { > > ModuleListingGeneralFunctions.PublishModule(arrCom mandArgument[1].ToString()); > > BindDataToGrid(); > > } > > } > > NB: this code works fine when run in the local machine but throws > javascript error only when accessed from some other machine > > Regards, > > Shiva. > > > "Jay Douglas" <> wrote in message > news:... >> Are you running the Item event of the datagrid using a CommandName or the >> click event on the link button? >> >> One trouble shooting step could be re-adding the link button. >> >> -- >> Jay Douglas >> http://www.jaydouglas.com >> >> >> "Shivakumar" <> wrote in message >> news:%... >>> Hi all, >>> Recently i have updated my vs.net 2003 project to vs.net 2005 and i >>> have successfully converted my code and found no problem with all my >>> controls except the one which is the linkbutton. >>> >>> I have added the linkbutton control in my datagrid and it rendered >>> perfectly but whenever i clicked the linkbutton am getting this error >>> >>> 'event' is null or not an object. >>> >>> I have checked with all the possibilities like using aspnet_regiis -i >>> and aspnet_regiis -c etc., and all my other controls like button, >>> hyperlink and all my javascripts work fine. >>> >>> I have used Scott Mitchell's skmlinkbutton, so i thought that would be >>> having some problem, so i removed that control and put microsoft's built >>> in linkbutton control and for my surprise am getting the same error. i >>> checked with the rendered javascript function which is in the following >>> format. >>> >>> >>> javascript:WebForm_DoPostBackWithOptions(new >>> WebForm_PostBackOptions("dgScreenDetails:_ctl6:nln Delete", "", true, "", >>> "", false, true)) >>> >>> i didnt understand what this script says(i mean parameters) and i >>> compared with some other script and found the target page is not >>> rendered. but still i couldnt able to find out the exact reason for this >>> error. can anyone please do help to solve this issue coz my whole >>> project got stuck because of this simple javascript error. >>> >>> Microsoft guys please do help me!. >>> >>> Thanks in advance, >>> Shiva. >>> >>> >> >> > > Jay Douglas |
|
|
|
#5 |
|
Posts: n/a
|
you should enable script debugging (advanced options in ie), and track down
the actual script error. unfortunately vs2005 generates its javascript on the fly rather then using script files, so if its a coding error you will need a hotfix. -- bruce (sqlwork.com) "Shivakumar" <> wrote in message news:%... > Hi all, > Recently i have updated my vs.net 2003 project to vs.net 2005 and i > have successfully converted my code and found no problem with all my > controls except the one which is the linkbutton. > > I have added the linkbutton control in my datagrid and it rendered > perfectly but whenever i clicked the linkbutton am getting this error > > 'event' is null or not an object. > > I have checked with all the possibilities like using aspnet_regiis -i and > aspnet_regiis -c etc., and all my other controls like button, hyperlink > and all my javascripts work fine. > > I have used Scott Mitchell's skmlinkbutton, so i thought that would be > having some problem, so i removed that control and put microsoft's built > in linkbutton control and for my surprise am getting the same error. i > checked with the rendered javascript function which is in the following > format. > > > javascript:WebForm_DoPostBackWithOptions(new > WebForm_PostBackOptions("dgScreenDetails:_ctl6:nln Delete", "", true, "", > "", false, true)) > > i didnt understand what this script says(i mean parameters) and i compared > with some other script and found the target page is not rendered. but > still i couldnt able to find out the exact reason for this error. can > anyone please do help to solve this issue coz my whole project got stuck > because of this simple javascript error. > > Microsoft guys please do help me!. > > Thanks in advance, > Shiva. > > Bruce Barker |
|
|
|
#6 |
|
Posts: n/a
|
I did bruce and its telling the following line got error ( 'event' is
null or not an object) <a id="dgScreenDetails__ctl5_Linkbutton1" NAME="Label1" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("dgScreenDetails:_ctl5:Lin kbutton1", "", true, "", "", false, true))" i couldnt parse this function, can u explain me if you know? Regards, Shiva comzy |
|
|
|
#7 |
|
Posts: n/a
|
Hi all,
I myself found the error at last and fixed! it was problem with WebUIValidation .js file. Thank you guys for trying to help me out. Regards, Shiva comzy |
|
|
|
#8 |
|
Junior Member
Join Date: Mar 2008
Posts: 2
|
Hi
Can u tell me how u solved this problem of linkbutton. What did u do in WebUIValidation.js file. As i m also facing same problem. Needhi |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Jun 2008
Posts: 2
|
Hi,
Has any of you been able to figure out and solve this problem with the WebUIValidation.js error. I'm experiencing the same problem right now. Basically, my LinkButton is giving me a 'Event' is null or not an object" Javascript error message, and I don't know how to fix it. If so, can you share with me how you fixed it. Thanks! lnong |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic LinkButton not working in ASP.NET | tapasmahata | Software | 0 | 03-14-2008 05:44 AM |
| Re: Weird problems | mhaase-at-springmind.com | A+ Certification | 1 | 02-18-2005 01:58 AM |
| Re: Weird problems | Danny Kile | A+ Certification | 0 | 02-16-2005 01:47 PM |
| Re: Weird problems | D V. Brown | A+ Certification | 0 | 02-16-2005 12:33 PM |
| Last days of Something Weird Auctions | KING B MAN | DVD Video | 0 | 05-29-2004 09:33 PM |