Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asp.net mvc

Posted on 2016-08-29
3
Medium Priority
?
75 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 44

Accepted Solution

by:
zephyr_hex (Megan) earned 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

972 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