|
If you dont want to put the values you are passing to the next page on the query string, then you may have to use save them in session
|
|
|
|
|
If you are using cross page posting, then you can find controls in previous page and get it's values. Assume you have a textbox in previous page with id as txt, value of this textbox can be taken by TextBox txt = (TextBox)Page.PreviousPage.FindControl("txt")
All posted values will be available in Request.Forms collection.
|
|
|
|
|
hi all,
I developed a Asp.net web application and it works well in my local system.When i hosted the same i am getting the error
"Login failed for user ''. The user is not associated with a trusted SQL Server connection. "
What exactly happened to the project ?Can anybody help me in solving the same.
Thanks in advance,
|
|
|
|
|
SQL Server (or Express) you deployed the database to is only enabled for Windows Authentication. You need to enable both SQL and Windows Authentication. You may also need to use SQL Server Surface Area Configuration to allow both local and remote connections - TCP/IP and named pipes
|
|
|
|
|
How can i achieve the mixed mode in authentication,in web config we are not able to set mode="mixed" right? i think only windows or forms authentication is allowed there
|
|
|
|
|
Thats because you need to make the authentication mode mixed on SQL Server, not your web app.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi every one
I am a beginner in ASP.NET
I am working on sending Email, but unable to get it...
I am screwed up........., i have tried many codes in google but i am confused.
Please any one can give me steps to follow from beginning to end.
|
|
|
|
|
Hi kiranreddy,
Try this:
using System.Net.Mail;
protected void btnSendMessage_Click(object sender, EventArgs e)
{
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAdress = new MailAddress("YourSenderEmail", "NameThatSendTheMessage");
smtpClient.Host = "YoursmptClientHost";
smtpClient.Port = 25;
message.From = fromAdress;
message.To.Add("MailAdressToWhoShouldRecieveTheMail");
message.Subject = "The message subject";
message.IsBodyHtml = false;
message.Body = "The message went here";
smtpClient.Send(message);
lblSendOk.Visible = true;
}
catch (Exception ex)
{
lblSendError.Visible = true;
lblSendError.Text = lblSendError.Text + " .<br />" + ex.Message;
}
}
If you have any trouble with the above code, you have to tell what exactly the error gives and copy your code, so we can see, if you have done anything else.
Kind regards,
simsen
|
|
|
|
|
you have to use System.Net namesapce and use
MailMessage Class.
cheers,
Abhijit
|
|
|
|
|
Hi all,
How to convert System.Web.UI.WebControls.Table into System.Data.DataTable ?
i tried it by
System.Web.UI.WebControls.Table t=new System.Web.UI.WebControls.Table();
System.Data.DataTable dt = new System.Data.DataTable();
dt = (System.Data.DataTable)t;
Its giving Error.
Error 9 Argument '1': cannot convert from 'System.Web.UI.WebControls.Table' to 'System.Data.DataTable'
Please suggest me how to do that.
Thanks in advance.
|
|
|
|
|
There is no direct method for that. You have to implement a loop to copy values.
|
|
|
|
|
|
if you are trying to display the data in the page then use datagrid
Thanks & Regards
Pete
|
|
|
|
|
|
Hi,
I am using .net 2.0. I want to use Autocomplete TextBox in my project. Why it is necessary to use webservice in Autocomplete TextBox? Is there any way to use Autocomplete TextBox without webservice? Please refer me some useful sites to learn about webservice.
Thanks.
|
|
|
|
|
|
Hi,
Thanks a lot for your reply. I will go through your codings and implement that.
Thanks.
|
|
|
|
|
kandalu wrote: Why it is necessary to use webservice in Autocomplete TextBox?
I dont think so it is necessary.
kandalu wrote: Is there any way to use Autocomplete TextBox without webservice?
Purpose of Web Services is diiferent. we can use it as a layer and use in multiple application . Go thorugh Google to learn use of webservices.
kandalu wrote: Is there any way to use Autocomplete TextBox without webservice?
Use Simply AJAX
kandalu wrote: Please refer me some useful sites to learn about webservice.
W3School, CodeProject.com
cheers,
Abhijit
|
|
|
|
|
Hi,
Thanks for your reply. First I will try without webservice and then I will try with webservice. Thanks for the hint given for webservice.
Thanks.
|
|
|
|
|
Webservice is not needed. If you haven't specified the webservice path, AutocompleteTextBox will pick the method from page. See what documentation says
ServicePath - The path to the web service that the extender will pull the word\sentence completions from. If this is not provided, the service method should be a page method.
|
|
|
|
|
Hi,
If I use a Function in .cs file that function is not called. If I use the same method using webservice it works well. The code is given below :
<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength="1"
ServiceMethod="GetRegC" TargetControlID="TextBox1">
The "GetRegC" is coded as a function in the default.cs file.
I don't know how to specify that function. So, I am using webservice.
Thanks.
|
|
|
|
|
HI,
I want to store the Image files in sql table and after inserting, I want to read and display the same in gridview.....
For storing ImagePath what is the datatype used and for Imagedata what is the datatype.......please help me..
Best Regards
Mcmilan
|
|
|
|
|
|
mcmilan wrote: For storing ImagePath what is the datatype used
Varchar
mcmilan wrote: for Imagedata what is the datatype.
VARBINARY(MAX)
|
|
|
|
|
I'm trying to set up an object data source which will be used to populate a text box for instance. The problem that I'm running into is that the object's method that does the actual query takes a parameter (ID). So I need to set
<pre>
&lt;asp:ObjectDataSource ID="odsCities" runat="server" SelectMethod="CitiesList" TypeName="WEBSWAPP_BLL.Demos"&gt;
&lt;SelectParameters&gt;
&lt;asp:ControlParameter ControlID="?????" Name="ProvinceID" PropertyName="AssemblyID"
Type="Int32" /&gt;
&lt;/SelectParameters&gt;
&lt;/asp:ObjectDataSource&gt;
</pre>
Now the problem is that the value that needs to be passed to the object is the assembly id but it's been retrieved from a drop down list which is located on the page itself. Now this new datasource that I'm setting is on a separate user conrol (.ascx file). So I can't use the drop down list from the page itself...whats the best way to accomplish that?
Thanks
|
|
|
|