|
hi shilpa,
I have also work on a project which is contain all user controls ecexpt on aspx web page which is load every user controls.
I thinks lots of advantage
like reusable is comman advantage and One of most advantages of user controls is that they can expose properties and methods like any object in the .NET Framework.
|
|
|
|
|
Hi.
I have an application developed using VB. The application is installed on the server and until recently I was updating it when needed without problems.
Yesterday I had to make new updated to the app. After I completed my updated and release both application and the set up project I removed previous version from the server and ran my new set up. When the set up was complete in the installed projects (Control Panel) I saw my application being installed (takes about 32 mg) but folder in the wwwroot was empty and of course the application didn't work because default and all other files (dlls too) are missing.
Did anyone have such a problem? I think there's something wrong with the permission (IIS) when I install the application. The installer works on my machine and all other machines as well.
There was something installed on the server recently and I think it did something that causes this to happen.
Thanks Alex.
|
|
|
|
|
Just make sure that IIS is pointing to the right folder.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Looks like it is.
When the install didn't drop any files into the application folder in wwwroot I copied all the files into the directory from one of the machines I was testing on. As soon as I did that the application was functional (so I guess IIS points to the right folder). I checked the IIS setting anyway to make sure. Strange.
|
|
|
|
|
Hello,
I am trying to convert this application I am working on from ASP.NET 1.1 to 2.0, and certain things are not working as they should. One thing is the code below
<br />
TextBox txtCompleted = new TextBox();<br />
TextBox txtProjected = new TextBox();<br />
position = j+1;<br />
CheckBox chk = Page.FindControl("chk_"+ j + "_" + ContractNum) as CheckBox;<br />
txtCompleted = Page.FindControl("txtCompleted_"+j+"_"+ContractNum) as TextBox;<br />
txtProjected = Page.FindControl("txtProjected_"+j+"_"+ContractNum) as TextBox;<br />
<br />
completed = txtCompleted.Text.Trim();<br />
projected = txtProjected.Text.Trim();<br />
CheckList_ID = int.Parse(CheckListID.Rows[j]["ID"].ToString()); <br />
<br />
In .NET 1.1 completed and projected get the values of the text boxes after the user clicks save, but in 2.0 this doesn't seem to work, I was wondering if anyone had any suggestions.
Sincerely,
The Major Rager
|
|
|
|
|
TheMajorRager wrote: txtCompleted = Page.FindControl("txtCompleted_"+j+"_"+ContractNum) as TextBox;
txtProjected = Page.FindControl("txtProjected_"+j+"_"+ContractNum) as TextBox;
If these controls already exist on your page why not call them directly rather than use FindControl?
only two letters away from being an asset
|
|
|
|
|
AS well as the previous comment, why would you write code that calls FindControl and has no block to make sure that it succeeded ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I am using below code for sending emails, I am getting email in mailroot queue, my system is connected to internet, what settings need to be done so email can send to valid email Id.
Imports System.Web
Imports System.Web.Mail
Function sendMail(ByVal i_strFromId As String, ByVal i_strToId As String, ByVal i_strCCId As String, ByVal i_strSubject As String, ByVal i_strMsg As String)
Dim objMail As New MailMessage()
If Len(i_strFromId) > 0 Then objMail.From = i_strFromId
If Len(i_strToId) > 0 Then objMail.To = i_strToId
If Len(i_strCCId) > 0 Then objMail.Cc = i_strCCId
objMail.BodyFormat = MailFormat.Html
objMail.Subject = i_strSubject
objMail.Body = i_strMsg
SmtpMail.Send(objMail)
End Function
Best Regards,
S Kumar
|
|
|
|
|
Set the SmtpMail.SmtpServer property to a valid email server
only two letters away from being an asset
|
|
|
|
|
Hello,
I had tried with SmtpMail.Smtpserver = "mail.valid.com" ' Valid smtpmail server
then also it is not working
Any setting require for SMTP server like SmartHost or anything ?
Please advise.
Best Regards,
S Kumar
|
|
|
|
|
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.
|
|
|
|