473,491 Members | 3,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Masterpage insert record problem

Bo
Can anyone explain why the code below inserts blank values into my access
database while the same code without the masterpagefile reference works and
inserts the values?

<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled
Page" %>

<Script runat="server">

Private Sub Insertimg(ByVal Source As Object, ByVal e As EventArgs)

SqlDataSource1.Insert()

End Sub

</Script>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:minConnectionString %>"

ProviderName="<%$ ConnectionStrings:minConnectionString.ProviderName %>"

InsertCommand="INSERT INTO iconimg (Imgname, Imgpath) VALUES (@Imgn,@Imgp)">

<insertparameters>

<asp:FormParameter FormField="Imgname" Name="Imgn" />

<asp:FormParameter FormField="Imgpath" Name="Imgp" />

</insertparameters>

</asp:SqlDataSource>

Billednavn: <asp:TextBox ID="Imgname" runat="server"></asp:TextBox>

Billedsti: <asp:TextBox ID="Imgpath" runat="server"></asp:TextBox>

<asp:button

id="Button2"

runat="server"

text="Insert"

onclick="Insertimg" />

</asp:Content>
Feb 10 '06 #1
0 979

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
16972
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
8
9210
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record...
8
6273
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
9
4333
by: Leffe Andersson | last post by:
Hi folks! I have a MasterPage with some public methods, and I would like to call them from a (app_code) class. Is it possible to set a directive or an assembly reference to a MasterPage from a...
0
1067
by: Herman verschooten | last post by:
Hi, I am creating my first real ASP.NET 2.0 site and want to use the some of the new features. I created a masterpage with my main layout and added several contentpages, no problem so far. I...
1
1247
by: Shell | last post by:
Hi All, I have a scenario where I have a Master Page for all of my WebPages, and in one of the pages I update a database record, after that I want to refresh this WebPart on Master Page...
3
2069
by: Alex Maghen | last post by:
Hi. I'm a little confused about the code that resides in the code-behind of a MasterPage and the code that resides in the code-behind of the actual pages that USE that MasterPage. I'm noticing,...
1
2918
by: supervictor | last post by:
Hello All, I'm working with VWD 2005 and VB and I'm facing the following problem: a web form works perfect by itself, but when I put it inside a masterpage, then the SqlDataSource2.Insert() which...
6
3576
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I want to insert a CSS Stylesheet file in a <LINKtag inside my MasterPage so that it will work in all of the the ASPX pages that use that MasterPage (no matter where the page is in the directory...
0
7118
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4886
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.