|
if dataset return different number of rows and want to get all values of rows then create number string variables equal with number of rows and set each strinng variables value from returned rows.
|
|
|
|
|
Can't I use arraylist.
Thanks and Regards.
-- modified at 9:00 Wednesday 21st June, 2006
|
|
|
|
|
Hi,
look it may help you.
''''''''''''''''''''''''''''''First Create one class
Public Class ComboClass
Private _id As Integer
Public Property ID() As Integer
Get
Return _id
End Get
Set(ByVal Value As Integer)
_id = Value
End Set
End Property
Private _name As String
Public Property Name() As String
Get
Return _name
End Get
Set(ByVal Value As String)
_name = Value
End Set
End Property
End Class
public sub Save()
//some database code here
Dim dataReader As IDataReader = database.ExecuteReader(dbCommandWrapper)
Dim comboClass As ComboClass
Dim returnArrayList As New ArrayList
While (dataReader.Read())
comboClass = New ComboClass
With comboClass
.ID = Convert.ToInt32(dataReader(0))
'TODO take this hack oout and replace with a column name
.Name = Convert.ToString(dataReader(1))
End With
returnArrayList.Add(comboClass)
End While
end sub
After this you have Arraylist with all fetched values that you can use.
Regards,
Nagraj
Let's Teach Life To Laugh........
|
|
|
|
|
I have this javascript:
function ConfirmationWindow()
{
var result = confirm("Are you sure");
}
This pops up a window for confirmation. Based on a yes or no selection by the user, I will like to insert or delect some data from a database but my problem is that, how do I get the true/false value of "result" which is in javascript and use it in my C#?
Any suggestion will be great
Thanks alot,
Commickey
|
|
|
|
|
U can take one Hidden textbox of html and store true or false depending on the selection of Yes or No by the User.
Brfore saving the record u first check the value of the hidden textbox and the save it.
I hope u got what I want to say.
Thanks and Regards.
|
|
|
|
|
sorry, can u help me with a code on how to do this?
|
|
|
|
|
Hi,
Just Drag and drop html hidden textbox on ur wen form and write the following javascript code and the changes accordingly...
function CommitChanges()
{
document.all("<%=htxtSName.ClientID%>").value = document.all("txtShortName").value;
document.all("<%=htxtLogName.ClientID%>").value = document.all("txtLogin").value;
var text = "Do you want to save the changes?";
if(!confirm(text))
{
document.all("<%=htxtSave.ClientID%>").value = false;
return true;
}
else
{
document.all("<%=htxtSave.ClientID%>").value = true;
return true;
}
Use this code for ur reference.htxtSave is the hidden textbox.
Thanks and Regards.
|
|
|
|
|
Another approach would be to have a button on the form that isn't displayed, which calls the update routine on the server - the check would then be something like....
<br />
res = confirm('do something?');<br />
if (res)<br />
{<br />
document.getElementById('MyASPNETButton').click();<br />
}<br />
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
WHATS WORNG WITH THE CODE BELOW---
<%Dim objCDONTS ' Email object
Set objCDONTS = Server.CreateObject("CDONTS.NewMail")
objCDONTS.MailFormat = 0
objCDONTS.BodyFormat=0
objCDONTS.From = "Admin" & " <" & "admin_auto@" & Request.ServerVariables("HTTP_HOST") & ">"
objCDONTS.To = Trim(Request.Form("mfr"))
objCDONTS.Subject = "Acknowledgement[Report a Problem]"
strBody ="We are dealing with your problem.This message is a system generated acknowledgement to your report. Please do not reply to this."
objCDONTS.Body = "--------------------------------------" & vbcrlf & vbcrlf & strbody & vbcrlf & vbcrlf & " --Support Team : Http://"& Request.ServerVariables("HTTP_HOST") & vbcrlf & "--------------------------------------------------------------" & vbcrlf & "MESSAGE ENDS: End of message"
objCDONTS.Send
Set objCDONTS = Nothing
response.write "mail sent to :"+Trim(Request.Form("mfr"))%>
MY WEBSERVER SUPPORT CDONTS MAIL
HELP ME ..PLZE
SREE
|
|
|
|
|
|
its notatall sending message. thats the problem is........
|
|
|
|
|
Is your local SMTP server configured correctly?
Regards
Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|
|
i used this is code in remote server and i am running this page , i dont know their smtp setting .
|
|
|
|
|
Hi,
I am sending mail in my application using this code.
Copy this code and run in your application if it works then make changes according to your need.
<%
sub sendmail(fromwho, towho, subject, body)
dim mail
set mail=server.Createobject("CDONTS.Newmail")
mail.from=fromwho
mail.to=towho
mail.body=body
mail.subject=subject
mail.send
set mail=nothing
end sub
fromwho=trim(request.form("eid"))
towho=trim(request.form("nam"))
subject=trim(request.form("sub"))
body=trim(request.form("mes"))
if fromwho <> "" then
sendmail fromwho,towho,subject,body
end if
%>
I hope this will help you.
Regards,
Nagraj
|
|
|
|
|
hi.
my manager want me use web service in this project .
i shouldn't work with database directly,and send data to web service and from web service run my query.my question is:
why do it?what's advantage this way than previous way(run query in program)?
and then how to do?
p.s. i searched about web service and advantage but that's not enough.
tank you.
|
|
|
|
|
|
tank you for your reply.
but i don't get my answer!
|
|
|
|
|
Hi all,
I am new to .net.
I developed webpage in ASP with some database handling I use SERVER.MAPPATH to locate database on server.
I use same concept in ASP.NET but when I upload this page on server ,it fires error regarding web.config.
I don't want to specify anything in web.config is it possible direct hard code database path in page. If yes what is use of web.config.
May be I want to know something more regarding web.config.
Information Regarding this is appreciated
Regards,
Nagraj
Let's Teach Life To Laugh........
|
|
|
|
|
|
Hi,
I can't exactly send you error because this error is occured to my friend and he asked me about solution.
Basically I want to know what can I use SERVER.MAPPATH to locate database if yes what is use of web config file in asp.net.
|
|
|
|
|
Web config file is not solely for storing connection info. Any configuration settings can be defined and consumed from the web application is a similar way to app.config files for windows forms/console applications.
Also, the web config file stores environment and security settings such as error output, page trace settings, security impersonation settings and much much more.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 7:00 Wednesday 21st June, 2006
|
|
|
|
|
Hi,
For more information I read one article which explain some uses of web.config file.
According to Article you can set your login page as start page when application start.Code is as below
<authentication mode="Forms">
<forms loginurl="login.aspx" name="3345C" timeout="1">
When I set any other(i.e. adduser.aspx) page as start page and I run application adduser.aspx page displyed instead of login page.
Can you explain me why it is so.
Regards,
Nagraj
|
|
|
|
|
Have u written this code Server.MAPPATH in Web.Config file ?
KHATRI
|
|
|
|
|
i want my web site to be accessible from a PDA.
i want to know if i have a asp.net web site hosted on a server, is it possiblle to access this site from a PDA just like i can access using a PC?
|
|
|
|
|