|
Now you're talking!!!
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Everyone,
I have used this code to attach a file. But the attachment does not work.
can anyone help me in this regard.
Dim MsgBuilder As New StringBuilder
MsgBuilder.Append("mailto:")
'MsgBuilder.Append("&cc=")
'MsgBuilder.Append("&bcc=")
MsgBuilder.Append("&BodyFormat = MailFormat.Html")
MsgBuilder.Append("&subject=Emailing- Testing")
MsgBuilder.Append("&body=" & strBody)
MsgBuilder.Append("&Attach=" & fname & "")
Regards,
Manowj
|
|
|
|
|
I'm looking the code how to pass a server connection to a sub report in Crystal Report. I'm using C # . The main report has different server name than the sub report. The user and password are the same in the main and in the sub report. I appreciate any help in this matter.
|
|
|
|
|
Hello,
I am having 10-15 application objects in global.asax file and my site would be deployed with web farming with approx three-four web servers....
Now my questions: How application object would be treated under web farming....Will all the servers have the same copy of application object? Or...................?????
Please advice
Thanks!!
Thanks!!
|
|
|
|
|
I'm new in asp.net I am using FCKeditor for mailing application. My problem is i cannot set the image path. Its default path is /userfiles/ in root. I cannot set the relative path.
please help me...
Anand
|
|
|
|
|
Hi,
I am trying to create a dynamic connectionString with windows authentication. I prepared like this "Integrated Security=SSPI;Initial Catalog=northwind;Data Source=server-Name" but it is not working. If I specify username and password by removing 'Integrated Security=SSPI' it is working fine.
Am I missing something to prepare a windowsAuthenticated connectionString ?
Thanks in Advance
Hari
|
|
|
|
|
this is more than enough for a windows authenticaiton connection string
"Server=XYZ; Database=ABC ; Trusted_Connection = True"
REGARDS
winnie
|
|
|
|
|
I am facing a problem in datagrid control.The issue as follows -
I have a datalist which is embeded in a datagrid and there is a Delete button in datalist along with other data.Thus the scenario is , there is button in datalist which is inturn in datagrid.There is only one column for datalist in which we have a linkbutton and the Delete button .I want to delete the row in the datalist corresponding to the delete button when i click the delete button which is there in datalist.
Can anyone provide me the solution for this, want to get the click event of the delete button and perform the delete action.If any one provide me some links related to this type of problems that will be really helpfull.
Thanks In Advance
Wish it Have it
|
|
|
|
|
|
hey..pls help..i need help..i m having trouble with makin of my project..which is to make a site similiar to orkut...
the part i am having trouble is in storing and retrieving images onto my sql server database using c#.net
i tried both image format and filepath format...
the problem is i am not much familiar with the sql and c# linkage..pls
pls do help me out..its urgent..dats y...
thanks in advance....
i've got to submit this in around 4to 5 days time..
|
|
|
|
|
you can store imagepath in database ...
you can upload photo using uplaodfile web control and retrive back using imagemap vontrol.....
hope this may clear the picture bit more...
imaran khan
|
|
|
|
|
|
|
you can use this code to insert a image
codebehind c#
private void getIMGproperites()
{
HtmlInputFile imageItem = this.FindControl("Img") as HtmlInputFile;
Int32 intImageSize;
string strImageType;
Stream ImageStream;
intImageSize = imageItem.PostedFile.ContentLength;
strImageType = imageItem.PostedFile.ContentType;
ImageStream = imageItem.PostedFile.InputStream;
imageInsert(intImageSize, strImageType, ImageStream, intAlbumId, struseridHome);
}
public static string imageInsert(Int32 intImageSize, string strImageType, Stream ImageStream, Int32 intAlbumId, string struseridHome)
{
string path = "Database=master;Server=noussrv1010;pwd=sa;uid=sa;";
SqlConnection conn = new SqlConnection(path);
string strStatus = MyConstants.StrStatusOne;
byte[] ImageContent = new byte[intImageSize];
int intStatus;
intStatus = ImageStream.Read(ImageContent, 0, intImageSize);
SqlCommand myCommand = new SqlCommand("PNP_Inspic", conn);
myCommand.CommandType = CommandType.StoredProcedure;
SqlParameter imgEmail = new SqlParameter("@Email_ID", SqlDbType.VarChar, 40);
imgEmail.Value = struseridHome;
myCommand.Parameters.Add(imgEmail);
SqlParameter imgAlbumId = new SqlParameter("@PKAlbum_Id", SqlDbType.VarChar, 40);
imgAlbumId.Value = intAlbumId;
myCommand.Parameters.Add(imgAlbumId);
SqlParameter imgImageact = new SqlParameter("@Image_act", SqlDbType.Image);
imgImageact.Value = ImageContent;
myCommand.Parameters.Add(imgImageact);
SqlParameter imgImageType = new SqlParameter("@Image_Type", SqlDbType.VarChar, 255);
imgImageType.Value = strImageType;
myCommand.Parameters.Add(imgImageType);
SqlParameter imgImageSize = new SqlParameter("@Image_Size", SqlDbType.VarChar, 400);
imgImageSize.Value = intImageSize;
myCommand.Parameters.Add(imgImageSize);
SqlParameter imgImageSubdate = new SqlParameter("@Image_Sub_date", SqlDbType.DateTime);
imgImageSubdate.Value = DateTime.Now;
myCommand.Parameters.Add(imgImageSubdate);
try
{
conn.Open();
myCommand.ExecuteNonQuery();
conn.Close();
}
catch (Exception ex)
{
strStatus = MyConstants.StrStatusTwo;
throw ex;
}
finally
{
struseridHome = null;
}
return strStatus;
}
AND THE PROCEDURE to insert the image
--***********************
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PNP_Inspic]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[PNP_Inspic]
GO
/****************************************************************************************************************
Insert/Update data from PNP_UPLOAD_FILES table
***************************************************************************************************************/
CREATE PROCEDURE PNP_Inspic
(
@Email_ID as nVarchar(40),
@PKAlbum_Id as nVarchar(20),
@Image_act as Image,
@Image_Type as nVarchar(255),
@Image_Size as nVarchar(400),
@Image_Sub_date as Datetime
)
AS
BEGIN
INSERT INTO PNP_UPLOAD_FILES(Email_ID,PKAlbum_Id,Image_act,Image_Type,Image_Size,Image_Sub_date)
VALUES(@Email_ID,@PKAlbum_Id,@Image_act,@Image_Type,@Image_Size,@Image_Sub_date)
END
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
---***********************
winnie
|
|
|
|
|
codelinks wrote: INSERT INTO PNP_UPLOAD_FILES
You could have at least cut down your application-specific table names or comments.
|
|
|
|
|
soory dude no time for that,, otherwise would have given a very good code
winnie
|
|
|
|
|
My problem is this:
I got a client and I need to add the person I'll be talking to.
I click on the client's name I go to a new page and I can't click new or anything in that page coz I don't have any previous contacts with this client.
the detailsview shows up empty. coz I'm posting back to the new contact page the code of the client.
can u help me plz
BiG RaLpH
|
|
|
|
|
Hi All,
I am designing a yellow page site for my client, I want to add Google Search Feature in the web site, but unfortunately I don't know how to do it.
Can anybody please help me?
Thanx in advance.
Regards,
Paramhans Dubey.
|
|
|
|
|
|
Thanx Vasudevan for ur help
|
|
|
|
|
Hi all,
I am using asp.net2.0 and C# VS2005.
I am creating asp.net web server control templates Dynamically .
My requirement is such that sp return very no of field( 4 or 5 or 6 …).
Now I am assigning it to datalist by creating web server control template dynamilly.
My problem is as no of field return very .how can I change databinding(which is method of itemplate) method so that I can bind data as per field. That is how can I change the behavior of method Item_DataBinding(itemplate interface) so that it accept parameter
Please help.
Code i am using …….
public class MyTemplate:ITemplate
{
ListItemType templateType;
String para1, para2, para3, para4, para5;
public MyTemplate(System.Web.UI.WebControls.ListItemType type , string parameter1)
{
templateType = type;
para1 = parameter1;
}
//
public void InstantiateIn(System.Web.UI.Control container )
{
PlaceHolder ph = new PlaceHolder();
ImageMap imp = new ImageMap();
//declaration
imp.ID = "img1";
switch (templateType)
{
case ListItemType.Header:
// ph.Controls.Add(new LiteralControl("<html> <body>"));
ph.Controls.Add(new LiteralControl("<table border=\"1\">" ));
break;
case ListItemType.Item:
ph.Controls.Add(new LiteralControl("<tr align = left><td align = left >"));
ph.Controls.Add(imp);
// some code
//optional parameter
if (!((para1 == "categoryid") || (para1 == "customerid") || (para1 == "retailprice") || (para1 == "subcategory")))
{
ph.Controls.Add(item5);
ph.Controls.Add(new LiteralControl("<br />"));
}
ph.Controls.Add(new LiteralControl("</td></tr>"));
ph.DataBinding += new EventHandler(Item_DataBinding);
break;
case ListItemType.Footer:
ph.Controls.Add(new LiteralControl("</table>"));
break;
}
container.Controls.Add(ph);
}
// container code end
<b>static void Item_DataBinding(object sender, System.EventArgs e )
{
PlaceHolder ph = (PlaceHolder)sender;
DataListItem ri = (DataListItem)ph.NamingContainer;
//RepeaterItem ri = (RepeaterItem)ph.NamingContainer;
string impValue = (string)DataBinder.Eval(ri.DataItem, "photopath1");
// item1Value = (Int32)DataBinder.Eval(ri.DataItem, "CategoryID");
String item1Value = (String)DataBinder.Eval(ri.DataItem, "Categoryid1");
String item2Value = (String)DataBinder.Eval(ri.DataItem, "subcategoryid1");
String item3Value = (String)DataBinder.Eval(ri.DataItem, "customerid1");
String item4Value = (String ) DataBinder.Eval(ri.DataItem, "retailprice1").ToString() ;
((ImageMap)ph.FindControl("img1")).ImageUrl = impValue;
((Label)ph.FindControl("item1")).Text = item1Value.ToString();
((Label)ph.FindControl("item2")).Text = item2Value.ToString();
((Label)ph.FindControl("item3")).Text = item3Value.ToString();
((Label)ph.FindControl("item4")).Text = item4Value;
</b> }
}
thank you.
imran khan
|
|
|
|
|
sir ,
I want to implement barcode concept on asp.net application please give idea about it.
thanks
|
|
|
|
|
|
Why is it that I answered you, and you didn't bother to reply to me ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how to find out user name and domain name of a client browing aserver using asp.net
|
|
|
|