Solved

asp.net mvc

Posted on 2016-08-29
3
37 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 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now