|
Is there a way to convert an System.Drawing.Image to an System.Web.UI.WebControls.Image?
Im getting the image from database, the binary being in base 64 string. I then convert it back to an array of bytes. My problem is that I can't find a way to create the System.Web.UI.WebControls.Image with a Stream or an array of bytes... I got the Image from Drawing but I can't convert it back to a WebControl Image.
I suppose I must write down the file somewhere on the server then return the path but I dont want to leave these temporary images on the drive.
Any ideas or suggestion anyone?
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
anil.chelasani wrote: Is there a way to convert an System.Drawing.Image to an System.Web.UI.WebControls.Image?
No. The namespace is the clue. One is an image, and one is a control that shows an image. You need to write a page that returns the stream of bytes, and point an Image control to it.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thanks for reply.
but the problem is i am converting aspx page to pdf by using third party DLL. Here when i give an aspx URL it will execute that and create a PDF file, but it is not executing the link which is given to ImageURL of the image which resides on the aspx page. Please help me.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Your page should just contain the image, if you've done it right. No third party tool should change that, unless it flat out does not support images.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have a page (supplier.aspx) which will dispaly the anual report of the suppplier on which i have to show the Logo of that supplier. Logo is in Database so first i have to get that to a page(Logo.aspx) i am doing so it is working properly on the aspx by writing the following line of code in the supplier.aspx.cs.
image.ImageURL="Logo.aspx?supid=4";
Upto supplier.aspx page it is ok it is displaying the logo but when i conert supplier.aspx page to PDF using
pdfConverter.SavePdfFromHtmlStringToFile(pdfData, "a.pdf");
here "pdfData" is html rendered code of the supplier.aspx page. Here is our problem when it converts into PDf it is not displaying the image because it can't execute the path which we had given to ImageURL. It is executing the physical path on the disk and getting the image to pdf from disk but it is not working with aspx page link. So i just want to put directly the image on to the supplier.aspx page without calling Logo.aspx page.
Thanks & Regards,
Anil Chelasani
modified on Friday, May 29, 2009 3:15 AM
|
|
|
|
|
Hi,
I am new to asp.net, i would like to know whether there is any free online website testing tools available, i tried to find in google but could not get it?
plz help.
|
|
|
|
|
Subin Alex wrote: am new to asp.net
How new is new ? What other programming have you done ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
If you just want XHTML validation then check here:validate[^]
|
|
|
|
|
If you can't answer us, you want free tools, and you have no idea how to program, then I suggest you change careers, perhaps something in foodservice.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I am using LINQ to SQL classes in my application.I have added one table on to the O/R Designer from server explorer and saved DataClassses.dbml.
Now, if i open DataCalsses.designer.cs file, there should be a Partial Public Class DataClassesDataContext. This file also should contains an entity class for the table.
But i am getting an empty page without any code.
what would be the problem?
Can anybody please help me?
Thanks in advance.
sudha
|
|
|
|
|
hello my friends. here is my questions
1)
i have made an application with a database.
i have made a win application with a database included. i wite the code using datasets,datatables etc... if i want to see the new datas in a table i have to reload the MyDatabase.mdf file in order to see them if i save datas when i run the application, so if i make a setup.exe for this app when i run it and do some sabes in the database will iu be able to see them in the app??
2)
i created an setup.exe
but when i fire tha icon to run it it says something about the database
"An attempt to attach an auto-named database for file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\WebSite1\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be Opened, or it is located on UNC share."
any suggestions???
thank you
|
|
|
|
|
1 - your mdf is your DB. I don't believe you can use it without SQL Server installed. Once it's there tho, it will work, obviously
2 - Looks like you created an installer with your aspnetdb database. You shouldn't need to do that.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
yes but i have tpo make it setup exe for end users,
about the setup and this error message what shoud i do
|
|
|
|
|
|
The information in the table in the link is displayed from NSE(National Stock Exchange of India). Therefore find whether there is any web service is available to get the information. If there is any web service is found, then register for it, consume the web service and display the data in your web site. You can use ajax timer control to refresh it.
If you have any working RSS to get the stock data, then look into this link[^] which will help you display information from RSS feed.
|
|
|
|
|
Hi All,
I have a modalpopupextender inside the updatepanel
i want to focus the first control after i call
the Modalpopupextender1.show();
i wrote the code as below
scriptmanager.GetCurrent(page).SetFocus(TextBox1);
scriptmanager.GetCurrent(page).SetFocus("TextBox1");
scriptmanager.GetCurrent(this).SetFocus(this.TextBox1);
scriptmanager.GetCurrent(this.page).SetFocus(TextBox1);
none of the above is working and TextBox1 is usercontrol
how to get it .......
Regards
Koti.K
|
|
|
|
|
If TextBox1 is in a UserControl, then
TextBox txt1 = (TextBox)WebUserControl11.FindControl("TextBox1");
if (txt1 != null)
ScriptManager.GetCurrent(this).SetFocus(txt1);
|
|
|
|
|
still i am not getting the focus on textbox
Hi
my webusercontrol name is TxtMandatoryString
i wrote the code in .aspx.cs
button1_Click(Object sender,EventArgs e)
{
Modalpopupextender1.Show();
TextBox Tx=(TextBox)TxtMandatoryString.FindControl("Txt1");
if(Tx!=null)
{
ScriptManager.GetCurrent(this).SetFocus("Tx");
}
}
i run it in debug mode also
it goes inside the if loop
after that it goes to disassembly.cs finally the page is displayed without focus on the textbox(Txt1)...
|
|
|
|
|
Remove quotes from the TextBox Tx object. You have to pass a control object to SetFocus method not a string.
ScriptManager.GetCurrent(this).SetFocus(Tx);
|
|
|
|
|
Hi
Still no use,
It is not foucusing on textbox.
Controls are placed like this
UpdatePanel->Outside Button->modalpopup extender->PanelCaption
->PanelControls->different controls inside the panle.
Regards,
Koti.K
|
|
|
|
|
I'm looking for this to, I'm starting to thinkig that is a "Impossible Mission".
I'm trying this
<br />
[MASTER]<br />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"><br />
</asp:ToolkitScriptManager><br />
[/MASTER]<br />
[CONTENT]<br />
<div><br />
<asp:Panel ID="Panel1" runat="server"><br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
</asp:Panel><br />
<asp:ModalPopupExtender ID="ModalPopupExtender1" TargetControlID="LinkButton1" runat="server"<br />
PopupControlID="Panel1" Enabled="True"><br />
</asp:ModalPopupExtender><br />
<asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton><br />
</div><br />
[/CONTENT]<br />
<br />
[VB]<br />
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LinkButton1.Click<br />
ModalPopupExtender1.Show() <br />
ScriptManager.GetCurrent(Me.Page).SetFocus(TextBox1)<br />
[/VB]
|
|
|
|
|
In my code I added
TextBox txtOverschrijding = new TextBox();
txtOverschrijding.ID = "txtOverschrijding";
txtOverschrijding.CssClass = "DivWidth100px";
grdAlarmRegels.FooterRow.Cells[5].Controls.Add(txtOverschrijding);
AjaxControlToolkit.FilteredTextBoxExtender ftbe = new AjaxControlToolkit.FilteredTextBoxExtender();
ftbe.FilterType = AjaxControlToolkit.FilterTypes.Custom;
ftbe.FilterMode = AjaxControlToolkit.FilterModes.ValidChars;
ftbe.ValidChars = "1234567890.";
ftbe.TargetControlID = "txtOverschrijding";
If I look in the gridview in the footerrow. I see the TextBox but the filtering is not working. IS there a reason or have I forgot something?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
You have added the textbox txtOverschrijding to the grdAlarmRegels.FooterRow.Cells[5].Controls collection.
You also need to the FilteredTextBoxExtender 'ftbe' to the same Controls collection.
Hope this will help you.
|
|
|
|
|
Oh yes...this helps thank you very much
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Respected Sir
I have one doubt i have one tabcontainer and it contains 3 tabpanels in the bottom of the tabcontainer i used save button for save all the content But
my task is to apper next button in place of save that is my task please help me i am new to this work
|
|
|
|