0

I'm back with another problem. ;)

I managed to create a list with a multi lookup to another list, containing some labels. I added a webpart to list A's edit form to allow direct adding of labels to List B, with the intention of the added values showing up in the lookup immediatly.

First, I try to add a new label by filling in the textbox and clicking Create, as shown here: http://imgur.com/2duDbM3,hB8OCFo#2

However, the page then reloads, showing the lookup columns to be both empty, like here: http://imgur.com/2duDbM3,hB8OCFo#1

Is there anyway I can force a full refresh of the page via C# code behind the Create button that will make this page show up correctly?

Thanks in advance! David

0

You can always hook to a button press event via JavaScript\JQuery and refresh your page.

Example:

Hook to a click event and refresh the page:

$("#target").click(function() {
  location.reload();
}); 
  • Hi Alex, thanks for the tip. However, the reload() function gives the user a dialog asking to resend the information. In this case, they'd create the new label twice, while they're supposed to be unique. I've tried using "window.location.href=window.location.href;", that does give me the same page with the controls filled, but in the state that is was -before- adding the new label. The created label doesn't show up in the available labels column yet. :( – David Apr 3 '13 at 10:10
0

Call Response.Redirect(Request.RawUrl); at the end of your method. This will cause you to redirect to a fresh load of the page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.