0

I have a normal link button where I am getting data through like this

<a href="ViewRemarks.aspx?jobid=<%#DataBinder.Eval(Container.DataItem,"jobid") 
%>" id="btn_remarks" data-toggle="modal" data-target="#exampleModalCenter3" 
class="open-AddBookDialog btn btn-outline-info " ><i class="fa fa-comments" ></i>
</a>

Note: in this button, I am getting data called job id

Then I took one bootstrap modal inside that modal I kept one child page like this

<iframe style="width: 470px; height: 195px;" id="Iframe1" class="embed-responsive embed-responsive-16by9" src="ViewRemarks.aspx?jobid=null"></iframe>

Note: iframe is not showing in stackoverflow don't know why but yes that is an iframe so i kept one a before iframe.

But here I want to pass that particular jobid from that button inside the data table how can I solve this in asp.net or javascript anything is accepted please help.

1 Answer 1

2

So use the link target which will load the link in the iframe.

<iframe name="iframe1" id="iframe1" />

and the link

<a href="//example.com?foo=bar" target="iframe1">My LInk</a>

<iframe name="iframe1" id="iframe1"></iframe>

<a href="//example.com?foo=bar" target="iframe1">My LInk</a>

Sign up to request clarification or add additional context in comments.

11 Comments

i can't use directly link because i want that particular jobid, if I will click on that button it will take the jobid to the next page , but here I am showing that page into iframe so I have to pass that particular jobid then my data table will fetch the data according to that job id
And when you click on the link the link opens in the iframe.... it will not open in a new page. Try it
no not working bcs it is just redirecting to the child page which i don't want I want to popup the modal and fetch data inside there if u have any other suggestions also no proble.
It is unclear how a link that targets the iframe redirects to the child page in the main window. The link targets the iframe so clicking on it will load the link in the iframe. Did you actually try what I suggested?
I edited the code to include an example that runs. You can see clicking on the link opens up the example domain in the iframe.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.