|
Hi i have a form and i put validation controls(required field validator ) to many controls..
and causes validation is true for the submit button..
On the local its working properly but when the upload te page online its giving error
"Object reference not set to an instance of an object. "
Its not performing the validations...
can some one help me out please
Hepsy
|
|
|
|
|
are you doing in asp.net
if yes then you are in wrong forum
if no then I dont understand how you can just upload one page in Desktop application?
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
hepsy.i wrote: "Object reference not set to an instance of an object. "
This means that you're trying to use an object that your code assumed it either created or retrieved sucessfully. You're trying to do something like this:
Nothing.SomeMethod()
or
Nothing.SomeProperty = someValue
You can use a Nothing object...
|
|
|
|
|
Thank you Dave ..
But the problem is...............
I put validations(required field validators) for all the textbox....
when i click submit button......
its giving this error...
the first thing it should do is validations ......
and the first statement in the button submit event is page.validate()
but still it gives this error
"System.NullReferenceException: Object reference not set to an instance of an object."
Please help me
i'm not familiar with this
Hepsy
|
|
|
|
|
Well, are you handling any of the Validation events? Something in that code is assuming something it shouldn't be.
|
|
|
|
|
greetings again to you all,
guyz, again i need your help very very badly.
im successfull in creating textbox dynamically in the runtime.. but my problem now is how to get the data from the dynamic textbox...
code: creating textbox in runtime
While rd.Read
text = New TextBox
stForm.Controls.Add(text)
text.Visible = True
text.Name = "text" & CStr(xCnt)
text.Location = New Point(122 + (3 * xPnt), 135)
text.Size = New Size(60, 21)
text.MaxLength = rd.Item(0)
xCnt += 1
xPnt += 22
End While
after the code above it will display a number of textbox in the form, next is i will input some data in the displayed textbox....
my problem is How to get the data from the display textbox which was done at runtime?.....
your help is higly appreciated...
links/codes is highly appreciated..
start a new beginning in every ending; thats what life for......
|
|
|
|
|
may be you can access these textboxes like normal textboxes
the only difference between the two is that one is putted at designtime and another at runtime
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
tnx for the idea..
i already got the answer.... thank you... your help is very much appreciated...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
moomoooomoo wrote: text.Name = "text" & CStr(xCnt)
In this line you're already giving textbox a name and to get a data of that text box just use that name, it's simple.
E.g.
dim txtVal as string = textxCnt.text
this should do it i guess...
|
|
|
|
|
hi all,
i want to extract all frames from Avi file. Anyone have idea how can i do this thing in vb.net
Any help will be greately appreciated
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
If you search the site, I know there are articles on doing this with DirectX
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi Christian,
i search the site & get multiple article but when i use the source code then all is failed at specific point for Particular AVI file(Exception in AVIStreamGetFrameOpen!). However same code for other AVI file it works well.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
OK, sounds like an issue in your AVI.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Either the AVI is currupted or you don't have the appropriate video codecs to decode the video stream.
|
|
|
|
|
i need to select row by index from database sql server
fro example i want to reterive row in the index 5
what the correct sql statemnet for that purpose
md_refay
|
|
|
|
|
Hi,
I don't understand what your question is.
However I am gathering that you want to retrieve a record by referencing an index in SQL.
In SQL you do not access the indexes, they are set up by you to enable faster querying of data.
SQL will determine which index to use based on the query you supply, which is why creating indexes is so important - create an index incorrectly and you will slow down processing.
Having said that you can drop hints on which index to use in SQL.
So having said all of this:
1 - is this of any help to you?
2 - you refer to index 5, what is index 5?
regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
There are no numerical indexes in an SQL database. It doesn't work like an array of values. SQL Server does not guarantee the order of the records that comes out of the table unless you tell it to using the SELECT statements ORDER BY clause. For ORDER BY to work, you have to give it a column to sort on.
Once the table is returned, you can use an index number in the resulting DataTable object to get the row, though there's no real usefulness to this. Normally you'd just retrieve the one row you wanted from the database using a SELECT statement and a WHERE clause specifying a search criteria for the row you wanted.
|
|
|
|
|
Hi,
I have a gridview control in which i have added two comboboxes(cmbCity,cmbPincode) at the runtime.I populate the cmbCity combobox from the database at the form load event.
Now my requirement is that when ever i select an item from cmbCity ,the relevent picode should be automatically populated into cmbPincode.
Please help me out how to handle the cmbCity_SelectedIndexchanged event inside a gridview control..
I am using winforms.(vb.net & sql server 2000)
Pradip Kishore
|
|
|
|
|
Hi,
I need your help!!! I want to use the function StrConv("string", vbFromUnicode) in VBScript.
I found the following code, but the result isn't the same as from VBA, I tested in Excel.
Do anyone has any suggestion?
<br />
Public Function StrConv(stringData,conversion)<br />
Dim Stream<br />
Dim tmp<br />
Set Stream = CreateObject("ADODB.Stream")<br />
' Charsets <br />
' Windows-1252<br />
' Windows-1257<br />
' UTF-8<br />
' UTF-7<br />
' ASCII<br />
' X-ANSI<br />
Const UnicodeCharaset = "Windows-1252"<br />
Const BinaryCharset = "X-ANSI"<br />
Select Case conversion<br />
Case vbFromUnicode<br />
' Converts a Unicode string to Ascii<br />
With Stream<br />
.Charset = UnicodeCharaset<br />
.Type = 2<br />
.Open<br />
.WriteText stringData<br />
.Position = 0<br />
.Charset = BinaryCharset<br />
.Type = 1<br />
StrConv = MidB(.Read, 1)<br />
End With<br />
<br />
Case vbUnicode<br />
' Converts an Ascii string to Unicode<br />
Dim Length<br />
Dim Buffer<br />
<br />
If TypeName(stringData) = "Null" Then<br />
CStrU = ""<br />
Exit Function<br />
End If<br />
<br />
stringData = MidB(stringData, 1)<br />
<br />
Length = LenB(stringData)<br />
Dim Rs<br />
Set Rs = Server.CreateObject("ADODB.Recordset")<br />
Call Rs.Fields.Append("BinaryData", adLongVarBinary, Length)<br />
Rs.Open<br />
Rs.AddNew<br />
Rs.Fields("BinaryData").AppendChunk(stringData & ChrB(0))<br />
Rs.Update<br />
Buffer = Rs.Fields("BinaryData").GetChunk(Length)<br />
Rs.Close<br />
Set Rs = Nothing<br />
With Stream<br />
.Charset = BinaryCharset<br />
.Type = adTypeBinary<br />
.Open<br />
Call .Write(Buffer)<br />
.Position = 0<br />
.Type = adTypeText<br />
.Charset = UnicodeCharaset<br />
End With<br />
<br />
StrConv = Stream.ReadText(-1)<br />
End Select<br />
Stream.Close<br />
Set Stream = Nothing<br />
End Function<br />
|
|
|
|
|
You haven't even asked a question so there's really nothing to tell you.
gbgift wrote: I want to use the function StrConv("string", vbFromUnicode) in VBScript.
To do what??
gbgift wrote: I found the following code, but the result isn't the same as from VBA, I tested in Excel.
What's the "result"?? How is it different from what you expected?? What you trying to do with this code??
|
|
|
|
|
|
Look at the Case statements in your code. Where are these constants defined?? vbUnicode ??, vbFromUniCode ??
|
|
|
|
|
Const vbFromUnicode = 128
Const vbUnicode = 64
|
|
|
|
|
|
hello to all of you out their
i m using vb.net 2005, .net framework version 2.0. and trying to uploading file to my local server with my application.
the problem comes when i try to upload a file to the server, with the code
My.Computer.Network.UploadFile("C:\Documents and Settings\Administrator\Desktop\ashish.txt", "http://192.168.0.3/isol/ashish.txt", "", "", True, 1000, FileIO.UICancelOption.ThrowException)
it throw an error 404 not found
when i place a file having same name on the server, the program cannot throw any error but the file cannot be uploaded.
if i replace the code with this one, the code works fine and it places the file on the located computer.
My.Computer.Network.UploadFile("C:\Documents and Settings\Administrator\Desktop\ashish.txt", "file://///192.168.0.3/c/ashish.txt", "", "", True, 1000, FileIO.UICancelOption.ThrowException)
but this is not something like client/server this is simple network, i need to check it with online website. the server computer contain apache 2.0.59.
i think the problem is with the configuration of apache. i m working on it.
if some has any idea about that please let me know.
any kind of help is highly appreciated.
thanks in advance
help everyone
|
|
|
|