|
I did it
thanks alot
regards
Nour Abdel-Salam...
A Trainer and a Web Developer in Jedda Int'l Computer Center(JICC)
|
|
|
|
|
i have stored excel file in database i have to display it in a panel control. now my excel file is opening in a seperate window. i have written this code in page load event
my code is
try
{
string val = Session["f"].ToString();
connect = ConfigurationManager.AppSettings["connection"].ToString();
SqlConnection Sqlcon = new SqlConnection(connect);
string ssql = "select contents from reports where modulename='"+val+"'";
Sqlcon.Open();
DataTable dt = new DataTable();
SqlDataAdapter Sqladp = new SqlDataAdapter(ssql, Sqlcon);
Sqladp.Fill(dt);
int count = dt.Rows.Count;
for (int i = 0; i < count; i++)
{
byte[] file = (byte[])dt.Rows[i]["contents"];
// Response.ContentType = "application/ms-excel";
Response.ContentType = "application/xls";
//Response.BinaryWrite(file);
Response.OutputStream.Write(file, 0, file.Length);
//Response.End();
}
Sqlcon.Close();
}
catch (Exception EX)
{
string ERR = EX.Message;
}
finally
{
//Sqlcon.Close();
}
plz help to display in panel control
|
|
|
|
|
Don't double post. It's rude. People will ignore both your original message and this one.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi friends,
i am using ftpwebrequest to upload files on ftp server here is my code.
string uri = "ftp://myuserid:mypwd@ftp.shopzilla.com/myfile.txt";
FtpWebRequest reqFTP;
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri));
reqFTP.Proxy = null;
reqFTP.Credentials = new NetworkCredential("myuserid", "mypwd");
reqFTP.KeepAlive = false;
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
reqFTP.UseBinary = true;
reqFTP.ContentLength = fileInf.Length;
int buffLength = 2048;
byte[] buff = new byte[buffLength];
int contentLen;
FileStream fs = fileInf.OpenRead();
try
{
Stream strm = reqFTP.GetRequestStream();
contentLen = fs.Read(buff, 0, buffLength);
while (contentLen != 0)
{
strm.Write(buff, 0, contentLen);
contentLen = fs.Read(buff, 0, buffLength);
}
strm.Close();
fs.Close();
}
catch (WebException webEx)
{
WriteLog("Adding to Bizrate webex : " + webEx.Response.ToString());
WriteLog("Adding to Bizrate webex : " + webEx.Status.ToString());
WriteLog("Adding to Bizrate webex : " + webEx.Message);
}
catch (Exception ex)
{
WriteLog("Adding to Bizrate : " + ex.Message);
}
i am getting error
The remote name could not be resolved: 'ftp.shopzilla.com'
and status NameResolutionFailure
please give me any solution or link to solve this
Thanking you,
Laxmikant Lad
|
|
|
|
|
Hi
I have two database table there structure as follows..
ADA_category
catid catname status amount
and second table contain
ADA_Question
qid catid question status
I am adding question in each category and displaying category to the user in datagrid. But i want to display only those category which having more that or equal to 25 question.
How can i do this in a single query.
Please guide me.
Thanks I solved the problem
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Tuesday, March 18, 2008 2:21 AM
|
|
|
|
|
i have stored excel file in database i have display it in panel control.
my code is
try
{
string val = Session["f"].ToString();
connect = ConfigurationManager.AppSettings["connection"].ToString();
SqlConnection Sqlcon = new SqlConnection(connect);
string ssql = "select contents from reports where modulename='"+val+"'";
Sqlcon.Open();
DataTable dt = new DataTable();
SqlDataAdapter Sqladp = new SqlDataAdapter(ssql, Sqlcon);
Sqladp.Fill(dt);
int count = dt.Rows.Count;
for (int i = 0; i < count; i++)
{
byte[] file = (byte[])dt.Rows[i]["contents"];
// Response.ContentType = "application/ms-excel";
Response.ContentType = "application/xls";
//Response.BinaryWrite(file);
Response.OutputStream.Write(file, 0, file.Length);
//Response.End();
}
Sqlcon.Close();
}
catch (Exception EX)
{
string ERR = EX.Message;
}
finally
{
//Sqlcon.Close();
}
|
|
|
|
|
Have you solved this? How about using Office Interop?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hello friends,
I have created my first application in .Net 2005 but i am not able to find the .dll file.
Can anybody tell me where the .dll file of the application get saved?
Thanks,
Nagendra.
|
|
|
|
|
It doesn't, by default in VS2005 your pages are compiled the first time someone requests them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
Right click on project name then select publish website and select the path where you want to create dll file.
Regards
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
Hi All
I have the following element
<span id="Label2" style="display:inline-block;border-width:1px;border-style:Solid;width:200px;">Label</span>
(Actually this is the output of the ASP.NET Label Server Control)
I get two different outputs when I use IE and when I use FireFox browsers.
Has Anybody seen this.?
Thanks
Josh Coswell
http://riverasp.net
|
|
|
|
|
Odd that an ASP.NET control would not adapt, but different styles from the same css between browsers is common.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
First of all ,thanks for your kind reply...
I ahve a doubt.Is it possible to check the extension and file size of an image uploaded using asp file upload control using custom vallidator.I check the file size using client vallidation .It is work properly,but i want to include extension checking in the same custom vallidator.i will attach the size code below .plz answer for this question.
function LengthVallidation(source,value)
{
if((document.all('Upload_Logo').value.length>1080000))
{
value.IsVallid=false;
return false;
}
else
{
value.IsVallid=true;
return true;
}
}
Means allow only .jpg extension images...
|
|
|
|
|
|
SreejithAchutan wrote: First of all ,thanks for your kind reply...
You already thanked everybody for their reply...
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
hello frnds
i am using asp.Net 2.0 n develope a web-site in it, can i give windows Vista effect to my web application ???
what should i do to give better look to my web-site???
thankx in advnace
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
You can skin it any way you like.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thankx for Reply...
any example to use scin in asp.Net 2.0, that gives look like vista ???
thankx in advance
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
|
Hi!
I have a data access layer that will be used in a asp.net website. the data access layer users table adapter to get data. I want to know how to make the connection strings dynamic so that in asp.net website just by specifying connection details in web.config i could point to correct database without having recompile while data access layer.
thanks
|
|
|
|
|
my question is "how to change connection string of table adapters dynamically via web.config.
thanks
|
|
|
|
|
I am using a gridview and a textbox in an update panel. My aim is to search and display the items in the gridview based on the value in textbox. When a string is entered into textbox , it searches the fields that matches the string and binds it to the gridview. It is working perfectly without the full page refresh. The problem is that when I type something fast, it loses the focus, and i needed to click the textbox again with mouse in order to continue. If I do it by keeping intervals between keystrokes, it works. Please help me to keep the focus in the textbox always.
|
|
|
|
|
Hi
I have grid view which contains five rows and one button. By default button’ text is “Add”.
Suppose when I click on button of row two. So I want to change text of button from Add to Remove.
I have written code like this
protected void grdSearchResult_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
((Button)e.Row.FindControl("btnAdd")).Text = "Remove";
}
}
But this code changes all button text. I want to change only particular button which is clicked.
rajesh
|
|
|
|
|
OK, this must be a very very simple question for ASP programmers to answer.
After I have gathered all the information I want from the user and after
the user has clicked on a submit button, how do I make an operating system
style call on the server.
Now, I have already figured out how to create a function call in the ASP
development environment that is called when the user clicks on the submit
button.
So my qesttion is to how to create a system level command through ASP.
|
|
|
|
|
If you're using ASP, this is the ASP.NET forum. They are different.
What do you mean by 'system level command' ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|