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!!!! :)
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Soft CornerRank #1,221 · 1.5K reputationPosted Mar 14, 2011, 4:51 AM EDT
Ok Check Now .. looks like your problem solved :)
Soft CornerRank #1,221 · 1.5K reputationPosted Mar 12, 2011, 11:55 PM EST
Looks like you drop or used html control in your design.. check with button control ,it should be start with
Vijay YadavRank #1,637 · 943 reputationPosted Mar 13, 2011, 12:05 AM EST
I have used div of HTML but the textbox and buttons are asp control and yes, it start with "
Suthish NairRank #92 · 22.8K reputationPosted Mar 13, 2011, 12:12 AM EST
html or server controls.
controls nested inside other controls?
Vijay YadavRank #1,637 · 943 reputationPosted Mar 13, 2011, 12:20 AM EST
I'm using server control and it is not nested but then also it is giving problem, any idea?
Suthish NairRank #92 · 22.8K reputationPosted Mar 13, 2011, 12:28 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Mar 13, 2011, 12:33 AM EST
check the image
Vijay YadavRank #1,637 · 943 reputationPosted Mar 13, 2011, 12:34 AM EST
It is in VS 2008. And please find the attached file herewith.
Vijay YadavRank #1,637 · 943 reputationPosted Mar 14, 2011, 3:16 AM EDT
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!!!! :)
Soft CornerRank #1,221 · 1.5K reputationPosted Mar 14, 2011, 3:34 AM EDT
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 :)
Vijay YadavRank #1,637 · 943 reputationPosted Mar 14, 2011, 4:06 AM EDT
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.
Vijay YadavRank #1,637 · 943 reputationPosted Mar 14, 2011, 5:33 AM EDT
Thanks but may i know what was the problem? If it will encounter next time then what should i do? Can you tell me?..:)
Soft CornerRank #1,221 · 1.5K reputationPosted Mar 14, 2011, 6:15 AM EDT
In your aspx page, hyperlink control was not registered with page, so i drop one of hyperlink from toolbox to design . that's it ..
Thanks.....
Vijay YadavRank #1,637 · 943 reputationPosted Mar 14, 2011, 6:38 AM EDT
I didn't get you that hyperlink control was not registered with page means what? i want to know can please me?
Soft CornerRank #1,221 · 1.5K reputationPosted Mar 14, 2011, 7:30 AM EDT
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
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts