c# - Pass a value from one page to another use button or link and code? -
in asp.net, c#, want 3 conditions on particular click delete record: 1. ask confirmation 2. redirect page 3. pass id of record deleted internally(not present in text field or anything) next page record has deleted
if use link fulfill 2nd , 3rd condition using query string
but if use button, can fulfill 1st , 2nd condition.
and in onclick redirect next page.
i tried postback url also, gives value 0.
can tell me should use , how 3 conditions fulfilled?
ok got answer this. simple used in onclick event of button:
string redirect = string.format("~/admin-deleteemployee.aspx?id=" + id + ""); response.redirect(redirect);
and can ask confirmation , redirect page along value. 3 conditions satisfied. thanx lot!
Comments
Post a Comment