Click here to Skip to main content
15,922,894 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow can i invoke javascript functions in vb .net? Pin
eyes200713-Sep-07 2:53
eyes200713-Sep-07 2:53 
AnswerRe: Pdf to text Pin
WhiteGirl2313-Sep-07 2:07
WhiteGirl2313-Sep-07 2:07 
QuestionPdf to text Pin
Prakash_Mishra13-Sep-07 0:41
Prakash_Mishra13-Sep-07 0:41 
Questionrejoining split lines Pin
Mustafa Ismail Mustafa13-Sep-07 0:30
Mustafa Ismail Mustafa13-Sep-07 0:30 
AnswerRe: rejoining split lines Pin
Dave Kreskowiak13-Sep-07 4:34
mveDave Kreskowiak13-Sep-07 4:34 
QuestionHow to print Crystal report directly Pin
Swiss Mantoro12-Sep-07 22:28
Swiss Mantoro12-Sep-07 22:28 
AnswerRe: How to print Crystal report directly Pin
Steven J Jowett12-Sep-07 23:47
Steven J Jowett12-Sep-07 23:47 
QuestionUpdate Date Pin
TAK7812-Sep-07 12:11
TAK7812-Sep-07 12:11 
I'm trying to insert the new date when a selected Product is being updated.
But I can't get it to insert the date.
Here is my code:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
CellPadding="3" DataKeyNames="PartNumber" DataSourceID="SqlDataSource1" ForeColor="Black"
GridLines="Vertical" Width="700px"
AllowPaging="true" PageSize="18" AllowSorting="True" PagerSettings-Mode="NumericFirstLast">
<FooterStyle BackColor="#CCCCCC" />
<Columns>
<asp:BoundField DataField="PartNumber" HeaderText="Part Number" ReadOnly="True" SortExpression="partnumber" />
<asp:BoundField DataField="PartName" HeaderText="Part Name" SortExpression="partname" />
<asp:BoundField DataField="Picture" HeaderText="Image" SortExpression="image" />
<asp:TemplateField HeaderText="Original Price" SortExpression="Orgprice">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Orgprice") %>'></asp:TextBox>
</EditItemTemplate>

<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Orgprice", "{0:C}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Price" SortExpression="price">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("price") %>'></asp:TextBox>
</EditItemTemplate>

<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("price", "{0:C}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="description" />
<asp:TemplateField HeaderText="Date" SortExpression="date">
<EditItemTemplate>
<asp:Label ID="DateTxt" runat="server" Text='<%# Eval("Date", Date.Now) %>' />
</EditItemTemplate>

<ItemTemplate>
<asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
</Columns>
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#CCCCCC" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:AeroModelConnectionString %>"
DeleteCommand="DELETE FROM [CloseOut] WHERE [PartNumber] = @PartNumber" InsertCommand="INSERT INTO [CloseOut] ([PartNumber], [PartName], [OrgPrice], [Price], [Description], [Picture], [Date]) VALUES (@PartNumber, @PartName, @OrgPrice, @Price, @Description, @Picture, @Date)"
SelectCommand="SELECT * FROM [CloseOut] ORDER BY [PartNumber]" UpdateCommand="UPDATE [CloseOut] SET [PartName] = @PartName, [OrgPrice] = @OrgPrice, [Price] = @Price, [Picture] = @Picture, [Description] = @Description, [Date] = @Date WHERE [PartNumber] = @PartNumber">

<DeleteParameters>
<asp:Parameter Name="PartNumber" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="PartNumber" Type="String" />
<asp:Parameter Name="PartName" Type="String" />
<asp:Parameter Name="OrgPrice" Type="Decimal" />
<asp:Parameter Name="Price" Type="Decimal" />
<asp:Parameter Name="Picture" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Date" Type="dateTime" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="PartNumber" Type="String" />
<asp:Parameter Name="PartName" Type="String" />
<asp:Parameter Name="OrgPrice" Type="Decimal" />
<asp:Parameter Name="Price" Type="Decimal" />
<asp:Parameter Name="Picture" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Date" Type="dateTime" />
</InsertParameters>
</asp:SqlDataSource>

I appreciate any help and suggestion.
Thanks
AnswerRe: Update Date Pin
Dave Kreskowiak13-Sep-07 4:27
mveDave Kreskowiak13-Sep-07 4:27 
QuestionDropdown of available com ports Pin
Cory Kimble12-Sep-07 10:46
Cory Kimble12-Sep-07 10:46 
AnswerRe: Dropdown of available com ports Pin
Luc Pattyn12-Sep-07 14:53
sitebuilderLuc Pattyn12-Sep-07 14:53 
QuestionImage Resize and Crop, am I on the right track? Pin
RX Maverick12-Sep-07 10:20
RX Maverick12-Sep-07 10:20 
AnswerRe: Image Resize and Crop, am I on the right track? Pin
Dave Kreskowiak13-Sep-07 4:10
mveDave Kreskowiak13-Sep-07 4:10 
QuestionProblems binding datarelations to a listbox Pin
Mr Oizo12-Sep-07 9:31
Mr Oizo12-Sep-07 9:31 
AnswerRe: Problems binding datarelations to a listbox Pin
Dave Kreskowiak13-Sep-07 4:01
mveDave Kreskowiak13-Sep-07 4:01 
GeneralRe: Problems binding datarelations to a listbox Pin
Mr Oizo13-Sep-07 11:26
Mr Oizo13-Sep-07 11:26 
GeneralRe: Problems binding datarelations to a listbox Pin
Dave Kreskowiak13-Sep-07 12:38
mveDave Kreskowiak13-Sep-07 12:38 
GeneralRe: Problems binding datarelations to a listbox Pin
Mr Oizo15-Sep-07 0:36
Mr Oizo15-Sep-07 0:36 
GeneralRe: Problems binding datarelations to a listbox Pin
Dave Kreskowiak15-Sep-07 2:11
mveDave Kreskowiak15-Sep-07 2:11 
GeneralRe: Problems binding datarelations to a listbox Pin
Mr Oizo16-Sep-07 2:13
Mr Oizo16-Sep-07 2:13 
GeneralRe: Problems binding datarelations to a listbox Pin
Dave Kreskowiak16-Sep-07 4:46
mveDave Kreskowiak16-Sep-07 4:46 
GeneralRe: Problems binding datarelations to a listbox Pin
Mr Oizo16-Sep-07 5:25
Mr Oizo16-Sep-07 5:25 
GeneralRe: Problems binding datarelations to a listbox Pin
Dave Kreskowiak16-Sep-07 5:52
mveDave Kreskowiak16-Sep-07 5:52 
GeneralRe: Problems binding datarelations to a listbox Pin
Mr Oizo16-Sep-07 7:52
Mr Oizo16-Sep-07 7:52 
Questionsolution config file ? Pin
ttilque12-Sep-07 8:38
ttilque12-Sep-07 8:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.