| |

VerySource

 Forgot password?
 Register
Search
View: 650|Reply: 3

Can anyone help me look at the code

[Copy link]

4

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-20 16:40:01
| Show all posts |Read mode
<asp: TemplateColumn HeaderText = "aaa">
      <ItemTemplate>

<% # "<a href = javascript: var aa = window.open (User_Reg.aspx? id ="&DataBinder.Eval (Container.DataItem, "id")&");>"%> aaa </a>

 </ ItemTemplate>
    </ asp: TemplateColumn>


Wrong there, why can't I pop out the window? Although I can come out of the interface, I can't get out of the window by clicking aaa.
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-29 18:45:01
| Show all posts
<a href=javascript:var aa=window.open("User_Reg.aspx?id="&<%#DataBinder.Eval(Container.DataItem,'id')%>);> aaa </a>
Reply

Use magic Report

0

Threads

58

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-1-29 19:00:02
| Show all posts
<% # "<a href = javascript: var aa = window.open (User_Reg.aspx? id ="&DataBinder.Eval (Container.DataItem, "id")&");>"%> aaa </a>

Try:
<% # string.Format ("<a href = 'javascript: var aa = window.open (User_Reg.aspx? id = {0})'> aaa </a>", DataBinder.Eval (Container.DataItem, " id ")%>
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-1-29 21:09:01
| Show all posts
Looking at the generated HTML source code, you can find out the error of this sentence, the binding expression is wrong
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list