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...
Thanks for all your helps. In the example I gave C:\ without thinking. It's gonna be a network drive not my local C drive. Sorry for the confusion. I'm not very familiar with .NET. I don't do coding very often. The tutorials video my company bought use all data source, so I guess that the...
Hi all,
I use gridview to display data from a table. In one field I have a .pdf file path. I just don't know how to make it shown in hyperlink. Any help is greatly appreciated.
(in SQL table that field has the value of C:\temp\filename.pdf)
in asp.net page my code looks like this...
Hi all,
This is a little complicated to explain please bear with me.
What I'm trying to do is get an interactive map base on user's choice (by either click on the image or enter the facet map #) I have 2 pages
page1: map1.aspx
Sub doSubmit(ByVal sender As Object, ByVal e As EventArgs)...
Hi all,
I'm totally new to .NET. I'm trying some simple stuffs and stuck with form submit. Any help is appreciated it.
Form1:
form method="get" action="/IMap.aspx" id=form2 name=form1>
<b><i>Enter Facet Number: </i></b>
<input name="map" type="text" size="5">...
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.