javascript wtih LinkButton Confirmation box Formatting Text
-
I have a gridview that displays a delete LinkButton. I also have a javascript confim box display before any action is taken. This works just find. What I want to do is insert a carrage return in the confim box. I thought that I could use "\n" but for some reason when I try this the confimation box does not display and the row is deleted. below is the function I have that is displaying the box.
protected void SetDeleteButton(Object sender, EventArgs e) {
LinkButton btn= (LinkButton)sender;btn.Attributes.Add("onclick", "return confirm(\\"Removing this Category will remove all Sub-Categories and Products tied to this Category. Are you sure you want to proceed? \\");"); }
I get what I want from this except the format of the text is not neat. I would like to center the text if possible. and I want a new line where its asking the question "Are you sure you want to proceed?"
-
I have a gridview that displays a delete LinkButton. I also have a javascript confim box display before any action is taken. This works just find. What I want to do is insert a carrage return in the confim box. I thought that I could use "\n" but for some reason when I try this the confimation box does not display and the row is deleted. below is the function I have that is displaying the box.
protected void SetDeleteButton(Object sender, EventArgs e) {
LinkButton btn= (LinkButton)sender;btn.Attributes.Add("onclick", "return confirm(\\"Removing this Category will remove all Sub-Categories and Products tied to this Category. Are you sure you want to proceed? \\");"); }
I get what I want from this except the format of the text is not neat. I would like to center the text if possible. and I want a new line where its asking the question "Are you sure you want to proceed?"