|
I can do the same thing that u r doing now. But i won't, I m not like u.
That is the Lowest Level of Work To rate(1)
And It is not the last work to do, Mind It.
Still u r missing the chance to give the solution, and the thing that u were trying me to understand.
Believe Yourself™ :->™
|
|
|
|
|
Still.....
Shame on u.
Behave like a MAN.
Believe Yourself™ :->™
|
|
|
|
|
Sandeep and Gandalf, please do not fight over the issue. Thanks for both your suggestions. None of them is 'useless'.
As for why I am not using ASP.NET's radio button control - there are reasons why. The html imput control allows me the flexibility of including input text boxes and child radio buttons in between the radio button list items which is not possible using ASP.NET's control. Alternatively I am using javascript to enable/disable to the panel and that's working for me. Thanks for your help.
|
|
|
|
|
On no! We weren't fighting.
That was just a silly misunderstanding !
Anyway the last I can help is this link hope here u find something.....
http://www.mattkruse.com/javascript/[^]
Best Regards
- Gandalf -
Believe Yourself™ :->™
|
|
|
|
|
i have SAVE function and a stored procedure ("JobsDb_ContactInfo_InsertUpdateSingleItem" which return "returnValue" which is returned value integer of inserted UserId please help me get returned value UserID
i am trying to get Profile.UserId =Returned value of stored procedure UserId
This is the code i have in web form to save data
If Not (Profile.UserId = -1) Then<br />
myContactInfo.UserID = Profile.UserId<br />
<br />
[ContactInfoManager].Save(myContactInfo)<br />
<br />
Else<br />
Dim result As Integer = ContactInfoManager.Save(myContactInfo)<br />
Profile.UserId = result<br />
)<br />
End If
this is the Save function
Public Shared Function Save(ByVal myContactInfo As ContactInfo) As Integer<br />
Dim result As Integer = 0<br />
' Using<br />
Dim myConnection As SqlConnection = New SqlConnection(AppConfiguration.ConnectionString)<br />
Try<br />
Dim myCommand As SqlCommand = New SqlCommand("JobsDb_ContactInfo_InsertUpdateSingleItem", myConnection)<br />
myCommand.CommandType = CommandType.StoredProcedure<br />
myCommand.Parameters.AddWithValue("@Userid", UserId)<br />
<br />
Dim returnValue As DbParameter<br />
returnValue = myCommand.CreateParameter<br />
returnValue.Direction = ParameterDirection.ReturnValue<br />
myCommand.Parameters.Add(returnValue)<br />
myConnection.Open()<br />
myCommand.ExecuteNonQuery()<br />
result = Convert.ToInt32(returnValue.Value)<br />
<br />
myConnection.Close() Finally<br />
CType(myConnection, IDisposable).Dispose()<br />
End Try<br />
Return result<br />
<br />
End Function
appu
|
|
|
|
|
what is the error? how is it failing?
MrPlankton
|
|
|
|
|
it is giving no error but the data is not getting saved and the Profile.UserId is changing from -1 which is default to 0 please help me getting this solved as i m new to asp.net and the main Relational Key of all my database table is UserId and untill this is not solved i cant go any further...i have excecuted my stored procedure manualy and it is returning value of UserId but some how i made mistake in code os save function..
appu
|
|
|
|
|
It's been a while since I did any vb stuff but I suspect the problem is that you the return value needs to be an int and I believe you the add has a type argument as well that you need to specify.
Dim returnValue As DbParameter (make int)
returnValue = myCommand.CreateParameter
returnValue.Direction = ParameterDirection.ReturnValue
myCommand.Parameters.Add(returnValue) (add type to add, type would be SqlDbType.Int)
here is an example in c# and this works.
MyError = "adding ReturnValue parameter";
SqlC.Parameters.Add("@RETURN_VALUE", SqlDbType.Int);
SqlC.Parameters["@RETURN_VALUE"].Direction = ParameterDirection.ReturnValue;
MyError = "building exec string for stored procedure";
string cmd = "DeleteDateRange";
SqlC.CommandType = CommandType.StoredProcedure;
SqlC.CommandText = cmd;
MyError = "Executing query, calling DeleteDateRange";
ReturnValue = SqlC.ExecuteNonQuery();
ReturnValue = Convert.ToInt32(SqlC.Parameters["@RETURN_VALUE"].Value);
2 cents, good luck.
MrPlankton
|
|
|
|
|
Your question has nothing to do with ASP.NET.
You should post it in either the VB.NET or SQL forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
If i m not wrong then this is ASP.NET Section.
Better u go through VB.Net Section, U will get Better response
Believe Yourself™ :->™
|
|
|
|
|
How can I connect Database and Tables at runtime in Crystal Report?
|
|
|
|
|
techpub wrote: How can I connect Database and Tables at runtime in Crystal Report?
This is the ASP.NET forum. Your question has nothing to do with ASP.NET.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I want to connect crystal Report with databases using ASP.NEt code.
That's why , i thought, this is the right forum.
Sorry for that.
|
|
|
|
|
techpub wrote: I want to connect crystal Report with databases using ASP.NEt code.
That's why , i thought, this is the right forum.
It isn't. Your question relates specifically to Crystal Reports. The fact that you are using ASP.NET is irrelevent.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
U can try For The ADO.NET Section.
There u will get many responses .
Believe Yourself™ :->™
|
|
|
|
|
|
The main reason I can see for this is if you had permissions issue on the folder itself.
Vista sucks.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
That's not going to affect directory permissions which in Vista are OFF by default. So fiddle with the Style's directory permissions and you should be gtg.
Todd Smith
|
|
|
|
|
Just Check out for Administrative rights and folder permissions that may be solve the problem.
Sluggish Vista
Believe Yourself™ :->™
|
|
|
|
|
Is there any free framework to develop asp.net web directory or asp.net virtual shops? I mean a web directory that you only need to configure the layout and to add sites. Something like for forums. Thanks a lot.
http://www.softrun.ro
|
|
|
|
|
Hey all,
I am fairly new to the asp.net world and so far i am missing C# fully capabilities and control.
But since i want to learn how to create OS Independent solutions i want to try it out.
Could anyone help me with this:
1-) How can i display a message box? In java script i know i can use alert, prompt and confirm. But i am using C# scripts... and some asp books i have doesn't have it.
2-) I have a treeView control on the website but i want to collapse all elements but the selected node, i am doing like this:
protected void TreeVIEW_SelectedNodeChanged(object sender, EventArgs e)
{
TreeView Current = (TreeView)sender;
TreeNodeCollection childs = Current.SelectedNode.ChildNodes;
Current.SelectedNode.CollapseAll();
foreach (TreeNode child in childs)
if (child.Parent == Current.SelectedNode)
child.Parent.Expand();
else
child.Parent.Collapse();
}
what am i doing wrong???
thx all
Luis E Tineo S
modified on Thursday, February 07, 2008 1:59:38 PM
|
|
|
|
|
kingletas wrote: But i am using C# scripts
Well, that just doesn't work. Javascript, not C#, is what runs on the client. So to show the client a message box, you need to use javascript.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Dear all,
hi , i was trying to send an xml document over xmlhttp msxml2 object , the problem is i couldn't instantiate the same object using ASP.net
any ideas ????
modified on Thursday, February 07, 2008 10:35:07 AM
|
|
|
|
|
Can you please post the error you are getting at your end?
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Can Someone help here, I am getting the following error on a Windows forms User Control running on an asp.net webpage,
"request for permission of type system.net.mail.smtppermission failed",
the User Control is a complied DLL and I have included it on the ASp.net page, the user control is supposed to send an email when I click send it works fine in a vb form and does run the code on the webpage but wont send the email. how do i set the SMtp Permission in my code using the SmtpPermission Class in System.Net.Mail.
below is the code for sending the mail in the dll,
Function SendMail(ByVal MailServer As String, ByVal mailUser As String, ByVal MailPassword As String, ByVal EmailAddress As String, ByVal Message As String, ByVal FormAddress As String, ByVal Subject As String, ByVal Port As String, ByVal Auth As Boolean) As Boolean
Try
Dim message1 As New MailMessage(EmailAddress, FormAddress, Subject, HttpUtility.HtmlDecode(Message).ToString)
message1.IsBodyHtml = True
Dim emailClient As New SmtpClient(MailServer)
emailClient.UseDefaultCredentials = False
' used to authenticate the account used for sending mail
If Auth = True Then
Dim basicAuthenticationInfo As New System.Net.NetworkCredential(mailUser, MailPassword)
emailClient.Credentials = basicAuthenticationInfo
End If
emailClient.Port = CInt(Port)
emailClient.Send(message1)
Return True
Catch ex As Exception
MsgBox("SendMail Failed: " & ex.Message)
Return False
End Try
End Function
I have included the dll like so on the aspx webpage
<OBJECT id="SendMail2" height="193" width="527" classid="http:OCTBulkMailer.dll#OCTBulkMailer.eMailer" VIEWASTEXT >
<PARAM NAME="fromAddressVal" VALUE="email">
<PARAM NAME="emailEmailSubjectVal" VALUE="Testmail from OCT Mailer">
<PARAM NAME="emailMessageVal" VALUE='<%= Message %>' >
<PARAM NAME="SmtpAuthVal" VALUE="True">
<PARAM NAME="SmtpPassVal" VALUE="pass">
<PARAM NAME="SmtpUserVal" VALUE="email">
<PARAM NAME="Title" VALUE="Bulk Mailer">
<PARAM NAME="EmailAddressesVal" VALUE='<%= addresses %>'>
<PARAM NAME="SmtpServerVal" VALUE="server">
<PARAM NAME="SmtpPortVal" VALUE="25">
<PARAM NAME="Instructions" VALUE="Click Start to Start sending your mails">
</OBJECT>
|
|
|
|