CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 7/3/2006 10:58:08 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 76 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
mystical_potato
Asp.Net User
sqlDataSource fails to insert when inside master page7/3/2006 10:58:08 PM

0/0

  I have a page that I am using to insert records into a sql 2000 table.  The fields are nested inside a MultiView control.  If  I submit the page when using a master page (the master page has nothing in it that vs05 didn't but there) all nulls get insertered.  If I specify default values for the InsertParameters of the sqlDataSource control the default values get inserted.

If I copy my code and paste it into a page that does not use a master page it works perfectly.  Any idea why this might be hapening and/or how I can troubleshoot the page when using a sqlDataSource control?

thanks in advance

mp

bmains
Asp.Net User
Re: sqlDataSource fails to insert when inside master page7/4/2006 1:04:20 AM

0/0

Hey,

How are you passing the values to the SQL Data source?

Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
mystical_potato
Asp.Net User
Re: sqlDataSource fails to insert when inside master page7/4/2006 1:17:52 AM

0/0

the sqlDataSource control is grabbing them via <asp:FormatParameter FormField... >

Here is the code (abbreviated version) for the aspx page.  The containing master page has not been modified at all.

<%

@ Page Language="VB" MasterPageFile="~/Scott.master" AutoEventWireup="false" CodeFile="Contact_FormRedeaux.aspx.vb" Inherits="Contact_FormRedeaux" %>

<%

@ Register TagPrefix="asi" Namespace="AssistedSolutions.WebControls" Assembly="AssistedSolutions.WebControls.InputMask" %>

<

asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server" ID="Content1">

<asp:MultiView ID="mvMain" ActiveViewIndex="0" runat="server">

<asp:View ID="vwForm" runat="server">

<table width="0" border="0" cellpadding="2">

<tr>

<td valign="middle">Account Name </td>

<td align="left" valign="middle">

<asp:TextBox ID="txtAcctName" MaxLength="34" runat="server"></asp:TextBox>

</td>

</tr>

<tr>

<td valign="middle">Contact Name </td>

<td align="left" valign="middle">

<asp:TextBox ID="txtContactName" MaxLength="34" runat="server"></asp:TextBox>

</td>

</tr>

</table>

<p>

<asp:Button ID="btnSubmit" Text="Submit" runat="server" /> </p>

</asp:View>

</asp:MultiView>

<asp:SqlDataSource ID="sqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:APCCweb %>" InsertCommand="spInsContactRequest" InsertCommandType="StoredProcedure">

<InsertParameters>

<asp:FormParameter FormField="txtAcctName" Name="AcctName" DefaultValue="one" Type="String" />

<asp:FormParameter FormField="txtContactName" Name="ContactName" DefaultValue="one" Type="String" />

</InsertParameters>

</asp:SqlDataSource>

</

asp:Content>
bmains
Asp.Net User
Re: sqlDataSource fails to insert when inside master page7/5/2006 1:33:08 PM

0/0

Hey,

Try using the ControlParameter instead.  The controls in a masterpage are prefixed with ctl100$ because of the master page, and so formparameter wont work.


Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Master page bug with ID? - ASP.NET Forums I have an SQLDataSource and a FormView on my Content Page. My Master Page does ... However, the same master/content page fails on my VS2005 environment. ...
SqlDataSource Insert Command Error : VB.NET Visual Studio 2005, VB ... I am using a SqlDataSource and using the sqlInsert.Insert() command to put it into the database. However, when I click submit, the page ...
how to pass variable to SelectCommand of SqlDataSource? etc) you can always handle the SqlDataSOurce's pre-processing events ... Master pages - organising layout - contentplaceholder confusion ...
Implementing Optimistic Concurrency with the SqlDataSource : The ... Along with the “Generate INSERT , UPDATE , and DELETE statements” checkbox, the Advanced SQL ..... NET Page. Querying Data with the SqlDataSource Control ...
.NET ASP [Archive] - Page 37 - bytes Stopping Formview insert command button - too late to trigger isvalid=false ??? viewstate ... Adding HTML tags to data from SQL server · referencing files outside of web application with master page ... Login fails when run inside a frame! ... SqlDataReader - ReturnValue - rowcount · Update SqlDataSource with ODBC. ...
Gridview checkbox each row - insert selected in to another table ... <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" ... sqldatasource and connection exception handling In my page, I'm using a gridview and a sqldatasource. ... Failed to load viewstate. ... Formview dropdownlist won't populate in insert mode, but does in edit mode ? ... Master pages, radio buttons and JavaScript, oh my! ...
Scott on Writing Scenario: Creating a page with an editable GridView or insertable ... Unless the GUID column is visible in the DataGrid it seems to fail utterly. ... I generate the GUIDs when I insert rows. So, go to the SQLDataSource and edit .... NET Web Site Accessible · Master Pages Tutorials · Moving From Visual Basic to ASP. ...
Catch Exception with SQLDataSource - Database blog Catch Exception with SQLDataSource. ... Creating or altering table ' FakeWorkTable' failed . ... test my linq statement · execute master..xp_cmdshell 'whoami' returns NULL? ... Validating on insert · What is the best way to use custom pages? ... Code inside Where clause in EntityDataSource marku. ...
Feedback: sqldatasource does not update with simple textbox I have one multiline textbox named txtNotes on master/detail page with a sqldatasource. ... It looks like simple databinding fails. Can I not use the sqlDatasource for ... Add a SQLdatasource and it up to use the table with insert , ...




Search This Site:










asp.net menu 2.0(xml or resource file or run time)

setting a theme dependant on which domain you've arrived at

asp.net menu set non-selectedable item style

treeview; trouble changing other nodes, on selectednodechanged

master page with themes and css and choise of user interface also?

display sitemap.currentnode.title in a sub folder

stylesheet causing major problems

nested master pages hate intellisense

asp.net themes outputs double stylesheet link tags in header

can't copy and paste txt file to sitemap xml in vs express 2005

cannot load theme when try to call javascript in server side

masterpagefile="~/masterpage.master" is useless in web.config

master page losing page_load events on content page transactions

staticsitemapprovider and external links

enable and disable treeview child nodes

how to update or change the master page variables from a different page?

hyperlink issue

second level of menu

add postback control to treenode renderpretext

loss of menu control on site

sitemap - cannot get it to display

registerforeventvalidation

menu control formatting help - remove arrow that shows up on static menu if submenu exists

how to run see web site made on visual web developer 2005

skinning inherited control

using imageurlfield with a sitemap

multiple themes..menus constatly downloading images

manipulate treeview height between treenodes

master page cart update

dynamically including javascript files in masterpages

  Privacy | Contact Us
All Times Are GMT