|
Hi
How can i store an image(it is already in the image folder in the project)in a session variable? Also how can i retrieve this image and load it to an image control in asp.net
Thanks
Denny
|
|
|
|
|
Read the image in a byte[] and assign it to the session variable.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
As manash sugguested you can store image as byte array in the session variable. But why you are storing image in session variable ? Did you thing about size of session variable?
|
|
|
|
|
Hi,
Rather than storing Image in Session variable donot u think it is good to store the image path in Session.try this way....
|
|
|
|
|
Hello,
I am trying to send email from Microsoft outlook from my application, and I wrote following code :
string stSubject="";
string stTo="";
string stCC="";
string stAttachmentFileName = "";
string stDisplayName = "";
string stBody = "";
ApplicationClass oApplicationClass = new ApplicationClass();
NameSpace oNS = null;
MailItem oMailItem= (MailItem)oApplicationClass.CreateItem(OlItemType.olMailItem);
//stSubject is the mail subject
oMailItem.Subject = stSubject;
//stTo is the email to address
// oMailItem.From = "m.r.chavan@amc.nl";
oMailItem.To = "aa@aa.nl";
oMailItem.CC = "bb@bb.nl";
oMailItem.BodyFormat = OlBodyFormat.olFormatHTML;
//if you want it in the plain format, you can set body format as oMailItem.BodyFormat = Outlook.OlBodyFormat.olFormatPlain;
oMailItem.HTMLBody = stBody;
//oMailItem.Attachments.Add(stAttachmentFileName,(int)OlAttachmentType.olByValue,stBody.Length+1,stDisplayName);
oMailItem.Display(true);
Can anybody tell me how can i set the oMailItem.From in the mail, I know that the outlook is taking the default user account for mailing, but can I set the FROM property ?
|
|
|
|
|
You should system.net.mail to send mail from server code in asp.net.
I doubt very much you can mail from a clients machine.
I didn't get any requirements for the signature
|
|
|
|
|
milindchavan12 wrote: I am trying to send email from Microsoft outlook from my application,
What does it mean?
You want to send mail from ASP.NET Application? Did you googled for that?
milindchavan12 wrote: Can anybody tell me how can i set the oMailItem.From in the mail, I know that the outlook is taking the default user account for mailing, but can I set the FROM property ?
Why? what happend when you set the From property of MailMessage object?
|
|
|
|
|
HI
I want to draw a diagonal line in Panel in asp.net.It is possible in C#/VB.net but I want this in asp.net(web application).In windows application we can do this by Paint.Is there any solution for this in web application
Thanks
Denny
|
|
|
|
|
You are an ignorant moron. You've been told the answer, several times now. The best you can do, is to create a bitmap with a diagonal line in it, and use an img tag. You can't draw lines, HTML does not support that, although SVG does.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
|
I haven't used 1.1 in a long time. But the error suggest that it is looking for a server side method return.
Therefore, I suggesting using button.Attributes.add("OnClick", "return md5auth(Txt_password)"); in your server side code. Perhaps in page_load.
I didn't get any requirements for the signature
|
|
|
|
|
The first clue is that you're doing two different things. In the first case you're adding an onclick, which is called on the client', in the second, you set OnClick, which tries to call a method on the server.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Hi
I am looking for a way to check uncheck particular checkbox in radtreeview contol with checkboxes and also in checkboxlist. I can select and unselect all the checkbox but not any particular one.
Cheers
Andyyy
|
|
|
|
|
|
Well, you can start by only posting once, not to multiple forums. Its considered bad practice.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi All,
I am writing a user control which needs to allow users to enter simple HTML tags into a text box (strong, emphasis etc). Obviously, ASP.Net stops this by default.
If I were to write a page to do this, I know that I could use ValidateRequest="false" in the Page Attribute (this is all I can find on Google, which is frustrating as I already knew about it!)
The problem is that I am trying to do this in a single user control and do not have access to either the Web Config for the entire site or the code of the pages that this control will be used on.
Does anybody know of a way to do this? Or can anybody point me towards an article that solves the same issue?
Thanks,
Chris
[Edit: I can't use AJAX, so no AJAX solutions please!]
modified on Friday, June 5, 2009 7:02 AM
|
|
|
|
|
No possible, it seems by design.
|
|
|
|
|
A little out of date now, but thank you anyway
|
|
|
|
|
Hello,
I have created one crystal report in VS 2005. Its datasource is ref cursur returned by oracle stored procedure and it is working fine except one formula filed which i have code like following:
Here CURSPKG_JOIN is the name of oracle package and
OPEN_JOIN_CURSOR1 is the name of stored procedure.
Name of formula field is:finalres
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R1}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R2}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R3}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R4}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R5}='G'
or {CURSPKG_JOIN.OPEN_JOIN_CURSOR1.R6}='G',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='1','FIRST DIVISION BY GRACE',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='2','SECOND DIVISION BY GRACE',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='3','THIRED DIVISION BY GRACE',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='C','SUPPLEMENTARY',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='F','FAILED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='P','PASSED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='Z','PARTIALLY PASSED',
'xx')))))))
,
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='1','FIRST DIVISION',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='2','SECOND DIVISION',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='3','THIRED DIVISION',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='C','SUPPLEMENTARY',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='F','FAILED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='P','PASSED',
iif({CURSPKG_JOIN.OPEN_JOIN_CURSOR1.FR}='Z','PARTIALLY PASSED',
'yy'))))))))
and i put this formula filed on to the report; but it is printing the required result at somewhere and somwhere no print (even, i have given the false part i.e. 'xx' and 'yy') even with the same condition. I have double checked the data in the table and just for checking; i have placed the FR column on the report, which is carrying right value though. FR column is varchar2 length 1 character.
Please guide me where i am missing....!
Thanks & Regards
Girish Sharma
|
|
|
|
|
|
Solved it ... don't know if this is the best way ... but it works
protected void Page_Load(object sender, EventArgs e)
{
....
if (!Page.IsPostBack)
{
if (!String.IsNullOrEmpty(Request.QueryString["index"]))
this.tabs.ActiveTabIndex = Convert.ToInt32(Request.QueryString["index"]);
}
.....
}
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
I have a listbox that's values populate from a SQL datasource. In the form on the page there is also a gridView and when it's value changes the items in the listbox should change accordingly (well, technically, it should changes a sql parameter that updates the listbox).
In another SQL query I have an array of values. I then turn that into a string array. The values in that string array correspond to values in the listbox I'd like selected. This is where I'm running into trouble - how do I get the listbox items to be selected? I can't find a way to update the listbox.
Does anyone has any suggestions?
Any help is appreciated!
Thank you!!!
|
|
|
|
|
If you're doing a postback, just inject the HTML to select the item. If you're using a server control, you can probably just set properties on the control.
Without knowing how you're doing this ( AJAX? ) ,it's hard to say more.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
The goal of this project is to develop a website where users can enrol in a
chess competition and play each other until the final winner is decided.
The website will require an administrator to set up the competitions. Users
can then enrol in a competition by clicking on the appropriate link and
logging on. When the competition has sufficient players enrolled, players
are randomly selected to play each other in the initial round. Winners and
losers are then appropriately selected to play each other until the winner is
decided. To inform users that it is their turn to make a move, the server
should notify players via email. Winners, losers and new competition
announcements are also notified via email.
Optionally, the game can have drag and drop interactivity for players to
make moves. Players can also nominate to play against one of a number
of chess engine on the website if they want. The Administrator has the
option to have advertisements sent with the notification email messages.
Whenever an advertisement is sent to a player via email the advertiser's
account is charged a nominal rate, say 2c per add.
The above specifications should be taken as a guide only and may be
varied by making a request to the project supervisor. The group is
permitted to use an open source chess engine on this project (with
acknowledgments). e.g.
http://www.linuxlinks.com/Software/Games/Board/Chess/Engines/index.sh
tml
|
|
|
|
|
I assume the group you're part of has been assigned with this task as homework. If your attempt at research is to post it here and hope someone will do ( a LOT ) of work for you, then you're going to fail, and deservedly so.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|