|
|
Hi,
I need to send an email which has an attachment; the attachment is stored in sql server-2005, ina table as an image data type.
Thanks
shank
|
|
|
|
|
Download attachments from database and save in localdrive,then attach it in sending email.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
That database field must be Image type???
You just fetch the data from database and save it into a Stream..then attach it to the email from stream only.
CC26
|
|
|
|
|
Hi,
could you give me some sample code
thanks
|
|
|
|
|
Hi, I am populating a dropdownlist by clientside script.But after every postback the dropdown values vanish.How to persist them?
Thanks
CC26
|
|
|
|
|
DropDownList control have property
AutoPostBack=true If you don't use
selectedindexchange event then set autopostback to false,otherwise post your code and we will see where can be problem.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Probably you didn't get my question.I have no problem with dropdownlist autopostback or anything.
My problem is that, I am populating a dropdownlist using clientside script.
But whenever my page is postback( say...i clicked a button), all dropdownlist items vanish..How to persist them after postback.
CC26
|
|
|
|
|
Hi,
In that case you have to strore these values in hidden field and bind the dropdown again.
himanshu
|
|
|
|
|
May be making use of cookies workout for you.
|
|
|
|
|
protected void UpdateRecord(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
int autoid = Int32.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());
TextBox tDate = (TextBox)row.FindControl("txtDate");
TextBox tCoupon = (TextBox)row.FindControl("txtcoupon");
TextBox dStart = (TextBox)row.FindControl("txtStart");
TextBox dEnd = (TextBox)row.FindControl("txtend");
TextBox dBy = (TextBox)row.FindControl("txtby");
try
{
cnx.Open();
SqlCommand updateCmd = new SqlCommand("Update Coupon_Info,CouponType set Coupon_Info.RecievingDate=@date,CouponType.CouponName=@Coupon,Coupon_Info.Serial_Start=@Start,Coupon_Info.Serial_End=@End,Coupon_Info.Recieved_By=@By ", cnx);
updateCmd.CommandType = CommandType.Text;
updateCmd.Parameters.Add("@date", SqlDbType.Date).Value = tDate.Text.Trim();
updateCmd.Parameters.Add("@Coupon", SqlDbType.NVarChar, 60).Value = tCoupon.Text.Trim();
updateCmd.Parameters.Add("@Start", SqlDbType.BigInt).Value = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Values[0].ToString());
updateCmd.Parameters.Add("@By", SqlDbType.NVarChar, 50).Value = dBy.Text.Trim();
}
catch (Exception ex)
{
ErrorMessage.Text = ex.Message;
}
finally
{
cnx.Close();
cnx.Dispose();
}
}
Asp code for gridview is here
<asp:TemplateField HeaderText="Date" SortExpression="RecievingDate">
<EditItemTemplate>
<asp:TextBox ID="txtDate" Width="100px" runat="server" Text='<%# Bind("RecievingDate") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtDate1" runat="server" Width="100px"></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("RecievingDate") %>'></asp:Label>
Error message DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'.
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Coupon" SortExpression="CouponName">
<EditItemTemplate>
<asp:TextBox ID="txtcoupon" Width="100px" runat="server" Text='<%# Bind("CouponName") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtcoupon1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("CouponName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Serial Start" SortExpression="Serial_Start">
<EditItemTemplate>
<asp:TextBox ID="txtstart" Width="100px" runat="server" Text='<%# Bind("Serial_Start") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtstart1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Serial_Start") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="End" SortExpression="Serial_End">
<EditItemTemplate>
<asp:TextBox ID="txtend" Width="100px" runat="server" Text='<%# Bind("Serial_End") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtend1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("Serial_End") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Recieved By" SortExpression="Recieved_By">
<EditItemTemplate>
<asp:TextBox ID="txtby" Width="100px" runat="server" Text='<%# Bind("Recieved_By") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtby1" Width="100px" runat="server" ></asp:TextBox>
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("Recieved_By") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText ="Edit" ShowEditButton="True" />
|
|
|
|
|
hError message DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'RecievingDate'. ommandField
Your data source does not contain any property 'RevievingDate'. Check the data source from where you are retrieving the data.
|
|
|
|
|
thanx 4 reply.it has my datasource has a RecievingDate.
|
|
|
|
|
Perhaps it was ReceivingDate?
|
|
|
|
|
I use VSS 2005 And VS 2005 Team Sp1
After The Solution add to SourceSate , the member of team can not get the new file of the other member created from the parent folder's "Get..." Menu.
But can get the new file from project's "Get..." menu.
What's cause?
if I Get New Version from project's "Get.." menu , it will spend a lot of time.
|
|
|
|
|
jason,
This is ASP.NET Forum and your question does not related with ASP.NET. I will suggest you to ask the question in Visual Studio Forum.
Thank You !
|
|
|
|
|
hi all..
i m using activeX control in my website. that activeX control showing some
graphs by doing cube processing on button click.if i press the button 2 times continously then my all the session destroy .on googling
i come to know that if u will make the connection twice with cube (SQL analysing service) the session belongs to http connection will droped.
how to save my session variables...
any suggestion will be appreciated.....
|
|
|
|
|
Hello , I am developing an ASP.net applicaion, which will Connect to oracle instance running on different servers depending upon the user choice.
Since I have TNS on my machin it is working fine, Now I am going deploye the application.
Can please advice how to handle the situation.
|
|
|
|
|
hi all
i am using vb.net 2005 with office 2003
i want to identify the word having different font style
let's take an example
i have a word
best
in this word all font style is same means normal
but in this
best the letter s is bold
so i have to identify those words from my para
how can i find them ???
if i try for fornt.Bold thenit returns me False (0) if the number of chrar's are less in word
what can do ???
thankx in advance
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hello,
i have made a dll in .net. and i want to call this dll on submit buttonm of Html Page .How to call DLL in Html page?
Thanks & Regards
Raushan Kumar
|
|
|
|
|
You can call using javascript ..
sabarimd
|
|
|
|
|
Sabari MD wrote: You can call using javascript ..
How ?
|
|
|
|
|
yes, i want to call dll using javascript.
how to call...???
|
|
|
|
|
functin(parameter1,paramaeter2)
{
var Dll;
var Obj= new ActiveXobject("InstallDLL.Install");
Obj.ValidateUser(paramet1,paramet2,DLL);
return Dll;
}
sabarimd
|
|
|
|
|
u have given two parameter in function, what will pass in these parameter, actually i haven,t details knowledege about Javascript..
so please clear it...
|
|
|
|