Learn how to a build a cloud-first strategyRegister Now


unable to access labels or submit button in formview

Posted on 2011-05-06
Medium Priority
Last Modified: 2012-05-11
Hey guys.. i have my forumview set up

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="editpostadmin.aspx.vb" Inherits="forums_editpostadmin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Edit Post</title>
    <form id="form1" runat="server">
 <div class="style1">
        Edit Post<br />
        <asp:FormView ID="FormView1" runat="server" DataSourceID="AccessDataSource1">
<asp:TextBox id="title" runat="server" Text='<%#Eval("Title") %>' /> <br />
<asp:TextBox id="post" runat="server" Text='<%#Eval("Post") %>' TextMode="MultiLine" /><br />
        Important<asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#Eval("important") %>' />
          &nbsp; Locked 
            <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%#Eval("forumlock") %>'/> <br />
            <asp:Button ID="submit" runat="server" Text="submit" OnServerClick="SubmitBtn1_Click" /><br />
            <asp:Label ID="Label1" runat="server"
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/forums/forum.mdb" SelectCommand="SELECT * FROM [forum] Where ID = @ID">
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" />

Open in new window

but in my aspv.vb i cant access the label OR button???
Question by:runnerjp2005
  • 2
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 35706657
Of course not--they're inside an ItemTemplate, which means they don't *actually* exists until the databinding for the FormView occurs.

What is it you are trying to do?
LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 35706671

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question