|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
EDITITEMTEMPLATE FINDCONTROL PROBLEMdatabase issues and let user to change its value... The Error : ideefixesatisc.DataTextField = "Stokta Yok" Object reference not set to an instance of an object. In my edit item template i have a dropdown like that ////////////////////////////// My function Public Function SelectMyIndex(ByVal indexno As Boolean) Dim ideefixesatisc As New DropDownList If indexno = True Then ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) ideefixesatisc.DataTextField = "Stokta Var" ideefixesatisc.SelectedIndex = ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(True)) End If If indexno = False Then ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) ideefixesatisc.DataTextField = "Stokta Yok" ideefixesatisc.SelectedIndex = ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(False)) End If End Function <asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%# SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' > <asp:ListItem Value ="True" >Stokta Var</asp:ListItem> <asp:ListItem Value ="False" >Stokta Yok</asp:ListItem> </asp:DropDownList> /////////////// Savas,
Did you try it with the same cases for "CIdeefixeSatis". Identifiers as strings are not a real part of the VBNet code and therefore (mostly) case sensetive, By the way, why did you sent this message to the newsgroup languages.csharp, I don't see any C# code. Cor Show quoteHide quote "Savas Ates" <in da club> schreef in bericht news:erleHo9qGHA.1552@TK2MSFTNGP02.phx.gbl... > My aim is showing product availability in a dropdown by checking the > database issues and let user to change its value... > > The Error : > ideefixesatisc.DataTextField = "Stokta Yok" > Object reference not set to an instance of an object. > > > In my edit item template i have a dropdown like that > > ////////////////////////////// > > My function > > Public Function SelectMyIndex(ByVal indexno As Boolean) > > Dim ideefixesatisc As New DropDownList > > If indexno = True Then > > ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) > > ideefixesatisc.DataTextField = "Stokta Var" > > ideefixesatisc.SelectedIndex = > ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(True)) > > End If > > If indexno = False Then > > > > ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) > > ideefixesatisc.DataTextField = "Stokta Yok" > > ideefixesatisc.SelectedIndex = > ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(False)) > > > > End If > > End Function > > > > <asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%# > SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' > > > <asp:ListItem Value ="True" >Stokta Var</asp:ListItem> > <asp:ListItem Value ="False" >Stokta Yok</asp:ListItem> > </asp:DropDownList> > > > /////////////// > I didnt understand what you meant ? What you meant by saying
"CIdeefixeSatis" case ? How can i solve that problem ? "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl>, haber iletisinde þunlarý yazdý:u2HCxt9qGHA.4***@TK2MSFTNGP05.phx.gbl...Show quoteHide quote > Savas, > > Did you try it with the same cases for "CIdeefixeSatis". Identifiers as > strings are not a real part of the VBNet code and therefore (mostly) case > sensetive, > > By the way, why did you sent this message to the newsgroup > languages.csharp, I don't see any C# code. > > Cor > > "Savas Ates" <in da club> schreef in bericht > news:erleHo9qGHA.1552@TK2MSFTNGP02.phx.gbl... >> My aim is showing product availability in a dropdown by checking the >> database issues and let user to change its value... >> >> The Error : >> ideefixesatisc.DataTextField = "Stokta Yok" >> Object reference not set to an instance of an object. >> >> >> In my edit item template i have a dropdown like that >> >> ////////////////////////////// >> >> My function >> >> Public Function SelectMyIndex(ByVal indexno As Boolean) >> >> Dim ideefixesatisc As New DropDownList >> >> If indexno = True Then >> >> ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) >> >> ideefixesatisc.DataTextField = "Stokta Var" >> >> ideefixesatisc.SelectedIndex = >> ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(True)) >> >> End If >> >> If indexno = False Then >> >> >> >> ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) >> >> ideefixesatisc.DataTextField = "Stokta Yok" >> >> ideefixesatisc.SelectedIndex = >> ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(False)) >> >> >> >> End If >> >> End Function >> >> >> >> <asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%# >> SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' > >> >> <asp:ListItem Value ="True" >Stokta Var</asp:ListItem> >> <asp:ListItem Value ="False" >Stokta Yok</asp:ListItem> >> </asp:DropDownList> >> >> >> /////////////// >> > > Savas,
You use Uper and Lower cases in that identifier mixed up. Cor Show quoteHide quote "Savas Ates" <in da club> schreef in bericht news:uy8pq49qGHA.4336@TK2MSFTNGP02.phx.gbl... >I didnt understand what you meant ? What you meant by saying >"CIdeefixeSatis" case ? How can i solve that problem ? > > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl>, haber iletisinde þunlarý > yazdý:u2HCxt9qGHA.4***@TK2MSFTNGP05.phx.gbl... >> Savas, >> >> Did you try it with the same cases for "CIdeefixeSatis". Identifiers as >> strings are not a real part of the VBNet code and therefore (mostly) case >> sensetive, >> >> By the way, why did you sent this message to the newsgroup >> languages.csharp, I don't see any C# code. >> >> Cor >> >> "Savas Ates" <in da club> schreef in bericht >> news:erleHo9qGHA.1552@TK2MSFTNGP02.phx.gbl... >>> My aim is showing product availability in a dropdown by checking the >>> database issues and let user to change its value... >>> >>> The Error : >>> ideefixesatisc.DataTextField = "Stokta Yok" >>> Object reference not set to an instance of an object. >>> >>> >>> In my edit item template i have a dropdown like that >>> >>> ////////////////////////////// >>> >>> My function >>> >>> Public Function SelectMyIndex(ByVal indexno As Boolean) >>> >>> Dim ideefixesatisc As New DropDownList >>> >>> If indexno = True Then >>> >>> ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) >>> >>> ideefixesatisc.DataTextField = "Stokta Var" >>> >>> ideefixesatisc.SelectedIndex = >>> ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(True)) >>> >>> End If >>> >>> If indexno = False Then >>> >>> >>> >>> ideefixesatisc = CType(Page.FindControl("CIdeefixesatis"), DropDownList) >>> >>> ideefixesatisc.DataTextField = "Stokta Yok" >>> >>> ideefixesatisc.SelectedIndex = >>> ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue(False)) >>> >>> >>> >>> End If >>> >>> End Function >>> >>> >>> >>> <asp:DropDownList Runat =server ID="CIdeefixeSatis" SelectedIndex='<%# >>> SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis")) %>' >>> > >>> >>> <asp:ListItem Value ="True" >Stokta Var</asp:ListItem> >>> <asp:ListItem Value ="False" >Stokta Yok</asp:ListItem> >>> </asp:DropDownList> >>> >>> >>> /////////////// >>> >> >> > >
array element isexist ?
disabling checkbox in checkedlistbox ComboBox SelectionChangeCommitted event fires twice Datagrids (again) How much disk space is needed... .Net and 32 processors Deriving from Abstract Classes with Enums and Varying Object Types System.OverflowException during IPostBackDataHandler.LoadPostData VB6 to VB.NET EDITITEMTEMPLATE FINDCONTROL PROBLEM |
|||||||||||||||||||||||