Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebBrowser Control and Images [modified] Pin
#realJSOP3-Oct-08 22:48
mve#realJSOP3-Oct-08 22:48 
GeneralRe: WebBrowser Control and Images Pin
Jaime Olivares4-Oct-08 2:16
Jaime Olivares4-Oct-08 2:16 
GeneralRe: WebBrowser Control and Images Pin
#realJSOP4-Oct-08 2:35
mve#realJSOP4-Oct-08 2:35 
GeneralRe: WebBrowser Control and Images Pin
Jaime Olivares4-Oct-08 2:50
Jaime Olivares4-Oct-08 2:50 
GeneralRe: WebBrowser Control and Images Pin
#realJSOP4-Oct-08 3:13
mve#realJSOP4-Oct-08 3:13 
GeneralRe: WebBrowser Control and Images Pin
Wendelius4-Oct-08 7:14
mentorWendelius4-Oct-08 7:14 
GeneralRe: WebBrowser Control and Images Pin
#realJSOP4-Oct-08 8:42
mve#realJSOP4-Oct-08 8:42 
QuestionCannot implicitly convert type 'System.Web.UI.Control' to 'System.IO.MemoryStream' Pin
technette3-Oct-08 13:51
technette3-Oct-08 13:51 
I'm trying to correctly write the stream data to control.

Response.Write(stmDetailData = DWGControl);


Full event code:

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Control DWGControl = FindControl("dwgViewerCtrl");
const string sql = "SELECT Detail_ID, Detail_DWG from Detail_Info";
try
{
using (System.Data.SqlClient.SqlConnection cn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["DetailsDBFConnectionString3"].ConnectionString))
cn.Open();

using (System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("SELECT Detail_ID, Detail_DWG from Detail_Info"));

System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
DataSet_Details ds = new DataSet_Details();
da.Fill(ds, "DetailInfo");
int c = ds.Tables["DetailInfo"].Rows.Count;

if (c > 0)
{
Byte[] byteDetailData = new Byte[0];
byteDetailData = (Byte[])(ds.Tables["DetailInfo"].Rows[c - 1]["Detail_dwg"]);
System.IO.MemoryStream stmDetailData = new System.IO.MemoryStream(byteDetailData);
Response.Write(stmDetailData = DWGControl);

}
cn.Close();
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }

}
AnswerRe: Cannot implicitly convert type 'System.Web.UI.Control' to 'System.IO.MemoryStream' Pin
Jaime Olivares3-Oct-08 19:33
Jaime Olivares3-Oct-08 19:33 
Questioncompare 2 datetime and get hours Pin
Mohammed Elkholy3-Oct-08 9:36
Mohammed Elkholy3-Oct-08 9:36 
AnswerRe: compare 2 datetime and get hours Pin
J4amieC3-Oct-08 9:56
J4amieC3-Oct-08 9:56 
AnswerRe: compare 2 datetime and get hours Pin
J$3-Oct-08 9:59
J$3-Oct-08 9:59 
QuestionPut sound on own simple program Pin
MorganSim3-Oct-08 8:46
MorganSim3-Oct-08 8:46 
AnswerRe: Put sound on own simple program Pin
DaveyM693-Oct-08 9:04
professionalDaveyM693-Oct-08 9:04 
QuestionRe: Put sound on own simple program Pin
MorganSim3-Oct-08 10:22
MorganSim3-Oct-08 10:22 
AnswerRe: Put sound on own simple program Pin
Dan Neely3-Oct-08 10:32
Dan Neely3-Oct-08 10:32 
AnswerRe: Put sound on own simple program Pin
DaveyM693-Oct-08 10:58
professionalDaveyM693-Oct-08 10:58 
AnswerRe: Put sound on own simple program Pin
PIEBALDconsult3-Oct-08 9:37
mvePIEBALDconsult3-Oct-08 9:37 
QuestionRe: Put sound on own simple program Pin
MorganSim3-Oct-08 9:51
MorganSim3-Oct-08 9:51 
AnswerRe: Put sound on own simple program Pin
PIEBALDconsult3-Oct-08 10:23
mvePIEBALDconsult3-Oct-08 10:23 
QuestionPass Dataset table to a stored procedure as a parameter Pin
Litani3-Oct-08 8:46
Litani3-Oct-08 8:46 
GeneralRe: Pass Dataset table to a stored procedure as a parameter Pin
nelsonpaixao3-Oct-08 14:20
nelsonpaixao3-Oct-08 14:20 
QuestionProgammatically pressing underscore,$,% etc keys Pin
Sandeep Kalra3-Oct-08 7:43
Sandeep Kalra3-Oct-08 7:43 
AnswerRe: Progammatically pressing underscore,$,% etc keys Pin
Sandeep Kalra3-Oct-08 8:08
Sandeep Kalra3-Oct-08 8:08 
AnswerRe: Progammatically pressing underscore,$,% etc keys Pin
led mike3-Oct-08 8:49
led mike3-Oct-08 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.