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.
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.