|
When you say "is not working" what do you mean? Are you getting an exception, is the mail not being sent?
only two letters away from being an asset
|
|
|
|
|
Hi,
I am getting email in Mailroot/Queue, if I am using valid email id it is not sending email.
Regards,
SKumar
|
|
|
|
|
In the web.config, add a key under appsettings. The value should be the ip address of the machine which is hosting. If local machine, then put localhost.
<add key="smtpServerName" value="192.104.100.100"></add>
Then in your sendmail function add one more line before smtpmail.send.
SmtpMail.SmtpServer = ConfigurationSettings.AppSettings("smtpServerName")
SmtpMail.Send(objMail)
Regards,
Raghu.
|
|
|
|
|
How do I get photos to appear in a sql database using visual web deleloper? PLease see web site www.mkra.dnh.sk
Regards,
|
|
|
|
|
Normally, the way to do it is to store the path to the image in the database and store the image in the file system.
|
|
|
|
|
I am having terrible troubles at work trying to insert a parameter from a FORM into the Datagrid SELECT statement in ASP. I have searched MSDN knowledgebase, read and used examples, and am still having troubles.
Some details: I'm using the drag and drop method of inserting data from Visual Studio 2005 Database Connections from the table. I am using SQL Server 2005 and Visual Studio 2005 with .NET 2.0. I can get the data to display in the datagrids STATICALLY, but I need them to display dynamically using a parameter passed from the FORM control.
Some example code:
http://www.campus.ncl.ac.uk/databases/dotnet/aspdotnet2.html[^]
The only thing I need is for the code to have a FORM to enter a string or data and a datagrid that uses that parameter from the FORM inserted in the SELECT statement of the datagrid.
-Jesse Myer
-- modified at 11:11 Wednesday 9th August, 2006
|
|
|
|
|
Are you using c# or vb for your code behind?
|
|
|
|
|
VB.
Basically I need the program to do this, very simply a database call with a parameter.
1.User Form, user enters a string (user.form.string)
2.Call to database
3.Insert user.form.string into SELECT statement of ASP Datagrid
IE. Records have 2 items, IDENT tables, IDENT 1 = Georgia, IDENT 2 = Ohio
1.User enters an IDENT of 2
2. Datagrid displays with that IDENT of 1 in the SELECT statement
3. Display of Ohio information
The code should look something like this example from http://www.campus.ncl.ac.uk/databases/dotnet/[^]:
<%@ Page Language="vb" Debug="true" %><br />
<%@ import Namespace="System.Data" %><br />
<%@ import Namespace="System.Data.OleDb" %><br />
<script runat="server"><br />
<br />
Dim ResultCount As Integer<br />
<br />
Sub GetText(sender As Object, e As EventArgs)<br />
<br />
Dim dslath As DataSet<br />
Dim conLath As OleDbConnection<br />
Dim cmdLath As OleDbDataAdapter<br />
Dim Selectcommand As String = "select idno,year,text from latham " & _<br />
"where text like '%" + selection.value + "%'"<br />
Dim RcdCount As Integer<br />
<br />
<br />
conLath = New OleDbConnection( _<br />
"Provider=Microsoft.Jet.OLEDB.4.0;" & _<br />
"Data Source=\\tower1\home01\nlms1\datab2000\latham.mdb")<br />
<br />
cmdLath = New OleDbDataAdapter(selectcommand,conlath)<br />
<br />
dsLath = New DataSet()<br />
cmdLath.Fill(dsLath,"Txt")<br />
<br />
RcdCount = dsLath.Tables("Txt").Rows.Count.ToString()<br />
ResultCount=RcdCount<br />
RecordCount.Text="<font color=red>" & RcdCount & "</font> records found"<br />
<br />
GridLath.DataSource = dsLath.Tables("Txt").DefaultView<br />
GridLath.DataBind<br />
<br />
End Sub<br />
<br />
</script><br />
<html><br />
<head><br />
<title>Searching - uses Latham</title><br />
</head><br />
<body text="#000000" bgcolor="#ffffff"><br />
<h2 font="Verdana">Listing from Latham Accounts using dot net - with a search and a count of the records found. <br />
</h1><br />
<form runat="server"><br />
<P>Enter a word or part of a word</P><br />
<br />
<P><INPUT TYPE=text ID=selection VALUE="Enter a word" SIZE=30 runat="server"></P><br />
<br />
<P><INPUT TYPE=submit OnServerClick="GetText" VALUE="Start the search" runat="server"></P><br />
<br />
<p></p><br />
<asp:label id="RecordCount" runat="Server"/><br />
<P></P><br />
<HR><br />
<P></P><br />
<asp:DataGrid id="GridLath" <br />
Font-Name="Verdana" <br />
Font-Size="10pt" <br />
BackColor="#CCCCCC" <br />
Width="90%" <br />
Border="0" <br />
Cellpadding="5" <br />
runat="server" <br />
AutoGenerateColumns="False"<br />
EnableViewState="false"><br />
<HeaderStyle font-bold="True" HorizontalAlign="Center"/><br />
<Columns><br />
<asp:BoundColumn DataField="idno" HeaderText="Line number" /><br />
<asp:BoundColumn DataField="year" HeaderText="Year" /><br />
<asp:BoundColumn DataField="text" HeaderText="Text of the account" /><br />
</Columns><br />
</asp:DataGrid><br />
</form><br />
<hr><br />
Lorna.Scammell@ncl.ac.uk - August 2002<br />
</body>
:
-- modified at 14:25 Wednesday 9th August, 2006
|
|
|
|
|
Try using server controls, ie change the INPUT to <asp:textbox>. Also, since you are using 2.0 why not make use of the AccessDataSource control? You can configure this use the control as input to your select statement
only two letters away from being an asset
|
|
|
|
|
Isn't the AccessDataSource control only used for a static source file and not a SQL service?
|
|
|
|
|
conLath = New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=\\tower1\home01\nlms1\datab2000\latham.mdb")
You are using an Access dataabase not SQL Server correct?
only two letters away from being an asset
|
|
|
|
|
No that was an example. I however am using a SQL 2000 Database and need to reproduce the same thing that example code was doing.
|
|
|
|
|
Let me clarify...
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" EmptyDataText="There are no data records to display.">
<Columns>
<asp:BoundField DataField="OVERVIEW" HeaderText=" " SortExpression="OVERVIEW" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:trdConnectionString2 %>"
ProviderName="<%$ ConnectionStrings:trdConnectionString2.ProviderName %>" SelectCommand="SELECT [OVERVIEW] FROM [DOCPROJ] WHERE [IDENT]='1'">
</asp:SqlDataSource></code>
I need to put a parameter from an input box where the 1 is in [IDENT]='1', I know the syntax for the parameter but I don't know how to pass a user-entered parameter to there.
I need something that does this...but works:
Please Enter an ID<br>
<input name="selection" type="text" id="selection.value">
<input type="submit" name="Submit" value="Submit">
...
SelectCommand="SELECT [OVERVIEW] FROM [DOCPROJ] WHERE [IDENT]='%" + selection.value + "%'">
|
|
|
|
|
The answer is the same as I've stated previously. Use Server Controls instead of HTML controls and configure your datasource to use the value from the textbox in the select statement.
Also, in the future state your problem clearly in the first place. You will get an answer quicker and no waste everyones time
only two letters away from being an asset
|
|
|
|
|
Your answers are ambigious, I don't know what you mean by Server Controls how to configure my datasource (which is SQL not Access) to use the textbox...it was my problem in the first place.
|
|
|
|
|
The answers are not ambiguous.
Show some respect to this forum and the people in it who try to help, do some research on your own first before asking questions you don't even understand how to ask. If you don't understand the difference between server controls and html controls then pick up a book, use msdn, whatever, don't expect people to do everything for you.
only two letters away from being an asset
|
|
|
|
|
Don't answer my questions or the post if you haven't:
A. Read the post to begin with to understand from the beginning I'm using SQL and not Access, and to understand that some code were posted as examples. Basically Learn2Read.
B. Have an answer to the post, not just "go look at MSDN"
Your posts were just forum trolling and nothing more. I've checked MSDN, I've posted here a month before with no success, and I've read countless sites and articles from (datagridgirl.com to .edu sites on ASP).
I am looking for someone familiar with Datagrids, not someone to tell me to look somewhere else, thanks.
I'm sure I'll have to repost this question a month later thanks to you filling it up with dribble-drabble and off topic posts. And I'm sure you'll keep filling it up after this post, neither answering anything remotely on topic or relating to datagrids and parameters to begin with; but rather defending your "helping" to get more posts for some reason. So please save me the trouble and don't respond anymore to this thread Mark Nvnairnaind because you are not helping.
-- modified at 11:34 Thursday 10th August, 2006
|
|
|
|
|
Soot wrote: I am looking for someone familiar with Datagrids
http://www.codeproject.com/aspnet/datagriddemo.asp[^]
Soot wrote: I've checked MSDN, I've posted here a month before with no success, and I've read countless sites and articles from (datagridgirl.com to .edu sites on ASP).
You need more help then posting here then.
Soot wrote: I'm sure I'll have to repost this question a month later
Perhaps if you took that month to take a class and really learn you won't have to ask the same question again.
only two letters away from being an asset
|
|
|
|
|
Again thanks for the useless reply Mark Nischalke. If you had taken any time to read the questions I posted etc. You would have known I was looking for just one simple answer to one question: How do you link a parameter from a text box to a parameter in the datagrids SELECT statement.
Obviously as for "needing more help" you should pick up a book sometime and maybe take some pills to address your A.D.D. problem.
And thanks for the life lessons Mark Nischalke I'm sure you go out and take a class on programming problems anytime you have a problem, probably due to the fact people like you provide no valuable input at all on these forums.
|
|
|
|
|
Look, you have been on Code Project for 2 months don't go spouting off about unhelpful posts.
Your first post did mention about using SQL Server yet the example you gave earlier said "The code should look something like this example" which used an Access file. Look at the guide for posting questions; State your problem CLEARLY.
http://msdn2.microsoft.com/en-us/library/z72eefad.aspx -- Using Parameters with the SqlDataSource Control
http://msdn2.microsoft.com/en-us/library/w1kdt8w2.aspx -- Selecting Data Using the SqlDataSource Control
http://msdn2.microsoft.com/en-us/library/ms178306.aspx -- How to: Enable Filtering for SqlDataSource Controls (Visual Studio)
If you can't understand these articles then stop posting here because we can't help you.
You wrote:
Obviously as for "needing more help" you should pick up a book sometime and maybe take some pills to address your A.D.D. problem.
And what book should I pick up and read? I'm not the one asking the questions, I'm the one writing the articles.
A.D.D.??? I assume you are referring to Attention Deficit Disorder? Please tell me how this affliction applies? Not only are you insulting me personally (a violation of the mores of this forum) but also those that suffer from it.
Now go away, you bother me son
only two letters away from being an asset
|
|
|
|
|
Hello,
Is any 1 who can help me for integration with the EPDQ.
Please let me know i would be thankfull to you,
Hussain
Hussain
|
|
|
|
|
|
EPDQ it is the term use by Barclays Bank for Integrate the web site to the bank server where it will detect the money for Online Transactions’ what we have to do is we just need to passed the variables to the other server with ‘Post method’ the server check the card geniuses and I ill detect the money from the user account.
|
|
|
|
|
Hi there,
Am sorry I hv no idea abt this. But anyway, If the server expose it's method (as webservice) so we just call the method
That's just my thought, is this right?
<< >>
|
|
|
|
|
hi all,
there is problem with atlas pls can any one solve it
one thing which i fond is that when i click the Back BUTTON of internet explorer (IE) and i move back to previous page i h lost all the values in different control on this page
now user have to add new value again on this page if he only came back just to change a single value
do any one have solution of this problem
Thanks for anticipation
Regards
Masood Ahmed
|
|
|
|