Solved

asp.net mvc

Posted on 2016-08-29
3
45 Views
Last Modified: 2016-08-29
Hi Guys,

I"m wondering if is it possible to use element from index page to partial view:

For example:
I have index page and inside the page I have my partial view.

Now in the index page I have button <input type="button" id="btid">

I would like to use this "btid" in my partial view but it seems I can't do it as I can't use elements backwards. like if I have element in my partial view the index page can use them but not in the other way.

There is any trick that can make it work.

Thanks,
0
Comment
Question by:Moti Mashiah
  • 2
3 Comments
 
LVL 42

Accepted Solution

by:
zephyr_hex (Megan) earned 500 total points
ID: 41775278
Can you please elaborate on what you want to do by referencing the button in your partial view ?  Do you want it to submit ?  or what?

And please explain why you just can't use another button in your partial view.  Why does it have to be "btid" ?

We need to understand what you're attempting to do.
0
 
LVL 1

Author Comment

by:Moti Mashiah
ID: 41775375
Thank you for your answer.

Actually, I had to use the button from the index as I return the index page just one and then I return the partial, so in that case I couldn't see the button element as I had to hide it by condition.

I have solved the issue by moving the button from Index to partial view. Now both partial and index can use this button element.


Thanks.
0
 
LVL 1

Author Closing Comment

by:Moti Mashiah
ID: 41775376
Thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question