Exactly as I posted in my previous message. The default constructor for the SmtpClient picks up the settings from the config file, so you don't need to set anything in your code.
Our goal is to present user with three options, to send email using gmail, or outlook or yahoo.
In that case, the <mailSettings> element won't work. There isn't an option to load different sets of settings in different scenarios.
I'd still recommend putting the settings in the config file, so that you don't have to recompile your code if they change. But you'll need to store them differently, possibly using a custom configuration section.
I have a div which is misbehaving badly. It seems that some very long text entered into this "tableItem" is causing the icon within the div to be pushed down to the next line. How do I stop this maddening behavior?
I attempted to add an image, but I do not believe I was able to do that. The text gets put into the div via the code-behind, and could be anything, since it is data that comes from a database.
Thanks all for your assistance. Have a great weekend!!
Secondly, what prevents you from implementing it? Also, please set the data binding to the current data source, and DataGrid will automatically map the types of the columns to possible types. RadioButton, or CheckBox are two different types and have a different purpose. Show your data, sample input means and the table you have.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
I have run into a small problem, we have sent a bulk email containing a link to a pdf file, a week after the bulk mail the pdf file had to be updated. My problem now is some of the recipients still viewing the cache version of the pdf, is there a way to force the browser to view the updated pdf file?
Am using VS2008 Asp.net C#. I used Report.rdlc. I want to set A4size but 'SetPageSettings' function not enabled. It show error 'Does not contain a definition for SetPageSettings'
Below code i used
GlobalCS.sTraineeQry = sTrainQry1 + sTrainQry2 + sTrainQry3 + sTrainQry4 + sTrainQry5 + sTrainQry6 + sTrainQry7 + sTrainQry8 + sTrainQry9;
//set Processing Mode of Report as Local
ReportViewer1.ProcessingMode = ProcessingMode.Local;
//set path of the Local report
ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Session_RDLC.rdlc");
dsSession dsSes = GetData(GlobalCS.sTraineeQry);//new dsSession();
//ReportDataSource reportDataSource = new ReportDataSource();
//reportDataSource.Name = "dsSession_DataTable1";
//reportDataSource.Value = dsSes.Tables;
ReportDataSource reportDataSource = new ReportDataSource("dsSession_DataTable1", dsSes.Tables);
System.Drawing.Printing.PageSettings ps = new System.Drawing.Printing.PageSettings();
ps.Landscape = true;
ps.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1170);
ps.PaperSize.RawKind = (int)System.Drawing.Printing.PaperKind.A4;
I am getting the following Errors,while inserting drop down list values in sql server database
Server Error in '/Online_Book_Shopping' Application.
Procedure or function 'spRegisteruser' expects parameter '@countryname', which was not supplied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Procedure or function 'spRegisteruser' expects parameter '@countryname', which was not supplied.
Line 60: cmd.Parameters.Add(password);
Line 61: con.Open();
Line 62: int i= cmd.ExecuteNonQuery();
Line 63: con.Close();
Line 64: }
string constr = ConfigurationManager.ConnectionStrings["CS"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
SqlCommand cmd = new SqlCommand("spRegisteruser", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter name = new SqlParameter("@name", txtusername.Text);
SqlParameter mobile = new SqlParameter("@mobile", txtmobilenumber.Text);
SqlParameter password = new SqlParameter("@password", txtpassword.Text);
SqlParameter dropdown = new SqlParameter("@country",DropDownList1.SelectedItem.Value);
int i= cmd.ExecuteNonQuery();
Create Table dbo.RegisteredUsers
ID int identity Primary Key,
This is storedprocedure:-
Alter Proc spRegisteruser @Name nvarchar(20),
@countryname nvarchar(30), @mobile bigint, @password nvarchar(20)
Insert dbo.RegisteredUsers Values(@Name,@countryname,@mobile,@password)
My form is working properly but the only problem is the i want to make that the gridview should also visible when i select only one dropdown. The below dropdown is just a one sample of my code.
I have a 4 dropdownlist which are connected with gridview. It is like a if i trigger 1st dropdown i have to select 2,3,4 then only the grid will show related data. I want that if i select only 1 or 1&2 or 1&2&3 then also it should show related data
ALTER PROCEDURE [dbo].[UserManagement] @flag varchar(10),
@CallType varchar(50), @Format varchar(50), @disposition varchar(50),
if @flag = '0'
Select DISTINCT Disp_id,CallType, Format, Disposition, SUbDisposition from CallCenter..Loy_DispMstr
where isactive='1' and CallType=@CallType and Format=@Format and Disposition = @disposition and SubDisposition =@SubDisposition
if @flag = '1'
Select Formatid,Formatdetail,dispformat From loy_Formatdetail with (nolock)
Where isactive='1' and memberstatus = 'Member' order by FormatDetail
if @flag = '2'
Select DISTINCT Disposition from CallCenter..Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format
if @flag = '3'
Select distinct CallType,Format,Disposition,SubDisposition from Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format and Disposition = @disposition
if @flag = '4'
select PID,Memberstatus,calltype,format,disposition,subdisposition, man_data,
creation_date,createdby,updation_date,updatedby from Loy_SubPlaceholder