15
Answers

Asp.net event not go to .cs file rather it goes to design file

Photo of Vijay Yadav

Vijay Yadav

14y
2.4k
1
Hi,
All of a sudden, when i click on button, it is not going to the .cs file rather than it is going to the design and shows the event their but i want to in .cs(i.e. code file) .
Please help!!!! :)

Answers (15)

0
Photo of Soft Corner
NA 3.1k 484.2k 14y

Attachment test2.rar

Hi vijay,

    Ok Check Now .. looks like your problem solved :)
Accepted
0
Photo of Soft Corner
NA 3.1k 484.2k 14y
hi again,
 sometime user just copied & pasted the pages or code in project,bcz of that also *.aspx.cs file didn't found the controls. Also
 I just gone thro' this discussion & found some links to solve. 
   The 'controlname' does not exist in the current context

0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi Shrikant,
I didn't get you that  hyperlink control was not registered with page means what? i want to know can please me?        
0
Photo of Soft Corner
NA 3.1k 484.2k 14y
Hi Vijay,
  In your aspx page, hyperlink control was not registered with page, so i drop one of hyperlink from toolbox to design . that's it ..
   
  
I would appreciate if you mark it as an answer, if above post solved your query.

Thanks.....
0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi Shrikant,
Thanks but may i know what was the problem? If it will encounter next time then what should i do? Can you tell me?..:)
0
Photo of Vijay Yadav
NA 1.7k 538k 14y

Attachment my_app.rar

Hi Shrikant,
All of a sudden, now its going in codebehind file but now the problem is that though the control exists on the page but in code behind it is givig error (i.e.The name 'cmbreligion' does not exist in the current context) for allthe controls. Do you have any idea and i'm also sending you the file, please have a look.

0
Photo of Soft Corner
NA 3.1k 484.2k 14y

Attachment testing.rar

Hi Vijay,
  i think now you should take a look at this rar file were i have took one Server control button and Html button.
  solution is at your side only bcz still u havnt uploaded your code here :)
0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi,
Can any one please help me out here, on click of a button the event get showned in design file rather than code-behind file. Any help would be appreciated!!!! :)       

0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi Suthish,
It is in VS 2008. And please find the attached file herewith.
0
Photo of Suthish Nair
NA 31.7k 4.6m 14y

  
 
  check the image


0
Photo of Suthish Nair
NA 31.7k 4.6m 14y
can you attach the page.. also mention the VS version.
0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi Suthish,
I'm using server control and it is not nested but then also it is giving problem, any idea?
0
Photo of Suthish Nair
NA 31.7k 4.6m 14y

which control using?

html or server controls.

controls nested inside other controls?


0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi Shikant,
I have used div of HTML but the textbox and buttons are asp control and yes, it start with "<asp:" tag.
Any idea!!!!
0
Photo of Soft Corner
NA 3.1k 484.2k 14y
Hi vijay,
        Looks like you drop or used html control in your design.. check with button control ,it should be start with <asp: