Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. DetailsView FormView - SelectedValue bug

DetailsView FormView - SelectedValue bug

Scheduled Pinned Locked Moved ASP.NET
helpcsharphtmlvisual-studiosysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hanzaplast
    wrote on last edited by
    #1

    hi guys. i have strange bug or problem with this two controls. i will simplify my code as much as i can. i have this markup:

    <asp:FormView ID="fv" runat="server" DataSourceID="sds" DataKeyNames="id">
    </asp:FormView>

    <asp:DetailsView ID="dv" runat="server" DataSourceID="sds" DataKeyNames="id">
    </asp:DetailsView>

    <asp:SqlDataSource ID="sds" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnectionString %>"
    ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM [tablica]" >
    </asp:SqlDataSource>

    and lets say i need on first PageLoad get SelectedValue from eather of these:

    protected void Page_Load(object sender, EventArgs e)
    {
    object fvValue = fv.SelectedValue;
    object dvValue = dv.SelectedValue;
    }

    so here is strange situation (looks like evil bug!). fvValue and dvValue have null value, but debuging code using Visual Studio with brakepoints; when i collapse fv or dv and navigate to SelectedValue property it changes from null to "something"? anyone encounter this situation?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups