All,
This is what I currently have; and the error I got is
"Object reference not set to an instance of object" for line
myDDL.Items.FindByValue("strStatus").Selected = True
Please help me.
Protected Sub btnEditRecord(ByVal sender As Object, ByVal e As System.EventArgs)...
All,
I'm trying to find a way to fire a my btnEdit with no luck. I need some help. Thank you.
<asp:TemplateField>
<ItemTemplate>
<asp:Button runat="server" ID="btnEdit" Text="Edit" OnClick ="btnEditRecord"/>
</ItemTemplate>...
Never mind. I found out why I had that error. It's because after submit I set the dropdownlists back to default by
ddApp.item(0).selected = true
by changing it to
ddMap.SelectedIndex = 0
it works just fine.
Thank you all for your help
Thanks so much for your prompt response. I set viewstate = false (or do ddNum.Items.Clear()) and got error "System.NullReferenceException: Object reference not set to an instance of an object."
cmdInsert.Parameters.AddWithValue("@name", ddApp.SelectedItem.Text)
Any idea? Thank you.
All,
Below is what I have and when I click submit button I got the error "Cannot have multiple items selected in a DropDownList" Any help is appreciated.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then...
Thank you for your prompt response. I found out why I got the error. It's because I put
Session("myTable") = New Data.DataView()
before Page.IsPostBack
Hi all,
I'm trying to do sorting for my gridview. This is the error I got
Unable to cast object of type 'System.Data.DataView' to type 'System.Data.DataTable'
for this line
gvDetail.DataSource = SortDataTable(Session("myTable"), False)
Please help.
Protected Sub...
Below is what I currently have. I'd like to put a if statement there to make my column show "N/A" if the field has null value. Please help me with the syntax. Thank you.
<ItemTemplate>
<asp:hyperlink navigateurl='<%#string.Concat ("\\serverName\FileRequest\" ...
Hi all,
I use gridview to show my data. There's one field called description. It's very long so it looks really ugly if I have everything shown. Is there a way for me to show just 1st couple words the field & (make it hyperlink) so users can click on those words of that one record to expand...
Question for jeeckley,
I did as you said. When I hover the link text the url appears as file:///c:/temp but nothing opens. Do I miss anything ? And since this is a editable field, how should I fix the code in EditItemTemplate. Much appreciated.
<asp:TemplateField HeaderText=".pdf file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.