button link situation

D

Daves

I'd like to have a button on page A to open a FormView on page B... and in
Insert mode! How can I do that?
 
D

Daves

hmm... there is a button link (or even href link) on aspx page A
Then I have a FormView with ItemTemplate and InsertTemplate on aspx Page B

normally I'd do a button with command="Insert" in the ItemTemplate but I'd
like to be able to press that button on page A to go directly to Page B's
Formview and in Insert mode...
 
B

billmiami2

Your question certainly isn't very clear but I'll assume that you can
place page B into "insert mode" if you pass the appropriate parameter
to it in your querystring. Also, I'll assume that you want to open
page B in another window. You simply need to add a javascript (client
side) event handler to the button and you should be fine.

Protected WithEvents btOpenPageB As HtmlInputButton 'this is the
declaration for your button on page A

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

btOpenPageB.Attributes.Add("onclick",
"javascript:window.open('pageB?mode=insert','newwindow');")

End Sub

I hope this helps.

Bill E.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top