) expected erro when trying to create a popup

A

aaa

I have never had this much trouble creating a popup can someone give me a
heads up? Here is how I am trying to create a popup but I keep getting this
error:

Compiler Error Message: CS1026: ) expected

code:

<asp:LinkButton id="lnkDetail" runat="server"
onClick="window.open(http://www.microsoft.com,_new,toolbar=yes)">Details</as
p:LinkButton>
 
K

Ken Cox [Microsoft MVP]

You were missing some quotes, plus the way you were doing will cause a
syntax error. Here's a way to put the onclick into the control using the
code behind:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lnkDetail.Attributes.Add _
("onClick", _
"window.open('http://www.microsoft.com'," & _
"'_new','toolbar=yes')")
End Sub

<asp:linkbutton id="lnkDetail" runat="server">Details</asp:linkbutton>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto
 
A

aaa

thanx

Ken Cox said:
You were missing some quotes, plus the way you were doing will cause a
syntax error. Here's a way to put the onclick into the control using the
code behind:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lnkDetail.Attributes.Add _
("onClick", _
"window.open('http://www.microsoft.com'," & _
"'_new','toolbar=yes')")
End Sub

<asp:linkbutton id="lnkDetail" runat="server">Details</asp:linkbutton>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto

aaa said:
I have never had this much trouble creating a popup can someone give me a
heads up? Here is how I am trying to create a popup but I keep getting
this
error:

Compiler Error Message: CS1026: ) expected

code:

<asp:LinkButton id="lnkDetail" runat="server"
onClick="window.open(http://www.microsoft.com,_new,toolbar=yes)">Details</as
p:LinkButton>
 
A

aaa

One thing though this link control exists as part of an UltraGrid control.
There is not a design time reference to this object in the code behind only
the Html how can I work with this?


Ken Cox said:
You were missing some quotes, plus the way you were doing will cause a
syntax error. Here's a way to put the onclick into the control using the
code behind:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lnkDetail.Attributes.Add _
("onClick", _
"window.open('http://www.microsoft.com'," & _
"'_new','toolbar=yes')")
End Sub

<asp:linkbutton id="lnkDetail" runat="server">Details</asp:linkbutton>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto

aaa said:
I have never had this much trouble creating a popup can someone give me a
heads up? Here is how I am trying to create a popup but I keep getting
this
error:

Compiler Error Message: CS1026: ) expected

code:

<asp:LinkButton id="lnkDetail" runat="server"
onClick="window.open(http://www.microsoft.com,_new,toolbar=yes)">Details</as
p:LinkButton>
 
K

Ken Cox [Microsoft MVP]

Hmmm... Not sure of what the Ultragrid does but you might need to put the
code into a template if it supports them. Perhaps try the vendor's support
site?

aaa said:
One thing though this link control exists as part of an UltraGrid control.
There is not a design time reference to this object in the code behind
only
the Html how can I work with this?


Ken Cox said:
You were missing some quotes, plus the way you were doing will cause a
syntax error. Here's a way to put the onclick into the control using the
code behind:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lnkDetail.Attributes.Add _
("onClick", _
"window.open('http://www.microsoft.com'," & _
"'_new','toolbar=yes')")
End Sub

<asp:linkbutton id="lnkDetail" runat="server">Details</asp:linkbutton>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto

aaa said:
I have never had this much trouble creating a popup can someone give me
a
heads up? Here is how I am trying to create a popup but I keep getting
this
error:

Compiler Error Message: CS1026: ) expected

code:

<asp:LinkButton id="lnkDetail" runat="server"
onClick="window.open(http://www.microsoft.com,_new,toolbar=yes)">Details</as
p:LinkButton>
 
A

aaa

I got thanks again 4 the help!

Ken Cox said:
Hmmm... Not sure of what the Ultragrid does but you might need to put the
code into a template if it supports them. Perhaps try the vendor's support
site?

aaa said:
One thing though this link control exists as part of an UltraGrid control.
There is not a design time reference to this object in the code behind
only
the Html how can I work with this?


Ken Cox said:
You were missing some quotes, plus the way you were doing will cause a
syntax error. Here's a way to put the onclick into the control using the
code behind:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
lnkDetail.Attributes.Add _
("onClick", _
"window.open('http://www.microsoft.com'," & _
"'_new','toolbar=yes')")
End Sub

<asp:linkbutton id="lnkDetail" runat="server">Details</asp:linkbutton>

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto

I have never had this much trouble creating a popup can someone give me
a
heads up? Here is how I am trying to create a popup but I keep getting
this
error:

Compiler Error Message: CS1026: ) expected

code:

<asp:LinkButton id="lnkDetail" runat="server"
onClick="window.open(http://www.microsoft.com,_new,toolbar=yes)">Details</as
p:LinkButton>
 

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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top