Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert and return to another page

Status
Not open for further replies.

Nesscafe

Programmer
Aug 1, 2006
19
RO
hi. i have a small problem with a formview that has insert/update/delete methods the default ones. my problem is with the insert command/button, that actes ok if i leave it like it is, but i want to redirect the page after the insert command executs and stores the "thead", but when i use the urlpostback="x.aspx" or the Server.Transfer("x.aspx"); code it redirects me to the x.aspx page but without inserting into the data base what i have wrighten.
and one more thing i have a script that checks if all the fields ar empty or no. here's the code:

<script language="C#" runat=server>
void ValidateBtn_Click(Object Sender, EventArgs E) {

if (Page.IsValid == true) {
lblOutput.Text = "thread loaded";
}

else {
lblOutput.Text = "fields are empty";
}


}

</script>

and the insert button code:

<asp:LinkButton ID="InsertButton" OnClick="ValidateBtn_Click" runat="server" CommandName="Insert" Font-Bold="True" Text="Insert" Width="37px"></asp:LinkButton>

how can i get this to work? if i didnt explain very well, what the problem is, im sorry.

thanks in advence for any help.
 
sorry about that...didnt see i was on wrong forum :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top