user1260572 user1260572 - 22 days ago 7
ASP.NET (C#) Question

String concatenation vb in js

I am new to programming in asp.net.
Can anyone help me with this problem.

<input id="btnPartNo" type="button" class="form-control btn-default" runat="server" value='<%# Eval("out_partno")%>' onclick="popitup('summery.aspx?field1=value&field2=value2&field3=value3'); return false;" />

function popitup(url) {
newwindow = window.open(url, 'name', 'height=500,width=800');
if (window.focus) { newwindow.focus() }
return false;
}


I need to pass


Eval("out_partno")


value to the new popup window using get method

Answer
<input id="btnPartNo" type="button" class="form-control btn-default" runat="server" value='<%# Eval("out_partno")%>' onclick="popitup('summery.aspx?field1=value&field2=value2&field3=value3&trigger=' + this.value); return false;" />
<script type="text/javascript">
    function popitup(url) {
        console.log(url);
        newwindow = window.open(url, 'name', 'height=500,width=800');
        if (window.focus) { newwindow.focus() }
        return false;
    }
</script>