Link to home
Start Free TrialLog in
Avatar of Camillia
CamilliaFlag for United States of America

asked on

PostbackURL in linkbutton

I have a linkbutton with an onClick event;

<asp:LinkButton ID="lbFileUpload"    OnClick="FileUpload_Click" Text="File Upload" runat="server"  ></asp:LinkButton>

Open in new window


In the onClick event, I have a postbackURL. I put a debug step and it goes thru the step below but it stays on the same page:

 
protected void FileUpload_Click(object sender, EventArgs e)
    {
        lbFileUpload.PostBackUrl = "~/Main/FileUpload/DefaultFile.aspx?pageTitleId=39&patientId=" + PatientId;
    }

Open in new window


Now, If i have the PostbackURL in the aspx page, it works. I dont want it in the aspx page because I dont know how to add that "patientId"  <%# Eval("PatientPhone")%>  to the end of postbackURL.

Howcome it stays on the same page even tho it goes thru the onClick event?
ASKER CERTIFIED SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial