|
Thank you very much for you suggestion.
Finally I got to know and fix all the bugging.
This is so appreciate for your comment.
Thank you very much,
junior boy
|
|
|
|
|
VB.NET Code :-
Response.Buffer = True<br />
Response.AddHeader("content-disposition", "attachment; filename=MyFile.txt")<br />
Const adTypeBinary As Object = 1<br />
Dim BinaryStream As Object<br />
BinaryStream = CreateObject("ADODB.Stream")<br />
BinaryStream.Type = adTypeBinary<br />
BinaryStream.Open()<br />
BinaryStream.LoadFromFile("C:\data.txt")<br />
Dim BinaryData As Object<br />
BinaryData = BinaryStream.Read<br />
Response.BinaryWrite(BinaryData)<br />
BinaryStream = Nothing<br />
Response.End()
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
That looks like VB6 code that is just ported to .NET without converting to .NET technology. There is no reason to use a ADODB.Stream object in .NET, there are better stream objects in the .NET framework. You don't even have to use a stream object in .NET to output a file, there are methods for that in the HttpResponse object.
Real VB.NET code:
Response.Buffer = True<br />
Response.AddHeader("content-disposition", "attachment; filename=MyFile.txt")<br />
Response.WriteFile("C:\data.txt")<br />
Response.End()
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi All,
Here in my application, I've 2 password fields, after filling data in these fields when i change the Dropdownlist value, page_load call autometicly and these password fields lost their values, which i need. Please help me i don't know, what to do.
Regards
SMK
|
|
|
|
|
You need to make the attributes of the textboxes persistent (they retain their values):
txtPassword1.Attributes.Add("Value",txtPassword1.Text.ToString());<br />
txtPassword2.Attributes.Add("Value",txtPassword2.Text.ToString());
Hope this helps
|
|
|
|
|
Hello,
Thanx for ur cooperation, its working properly. Thanx once again.
Regards
SMK
|
|
|
|
|
Always glad to help...
|
|
|
|
|
Hi,
I have file myfile.zip or myfile.doc.
When i try to download this file using code i am able to download teh files as it is i.e
myfile.zip or myfile.doc.
But if I have a file like myfile.abc.zip or myfile.abc.doc
and when i try to download this file the name is getting changed as
myfile[1].abc.zip and myfile[1].abc.doc.
Why is this happening and is there a way to restrict the subscript.
Thanks for reading the query
manjunath
|
|
|
|
|
Hi all,
Please tell that whether Request.Form can be used for a div tag in the code behind of an aspx page.
Thanks
Senthil
|
|
|
|
|
Senthil_GeoEdge wrote: Please tell that whether Request.Form can be used for a div tag in the code behind of an aspx page.
No, you can't use Request.Form for that.
The Request.Form collection contains the data that was sent from the form fields in the form that was posted. Nothing else. If you want some information to be sent to the server when posting the form, you have to put it in a form field.
---
single minded; short sighted; long gone;
|
|
|
|
|
i got a problem how to acesss the values in the columns of gridview in which i am generating rows dynamically by using datatable...the row consists of one textbox and one fileupload components...i want to store the values entered into textbox and the filepath into database ...
could some one help me in this regard
|
|
|
|
|
Hi
I have created one image control and 2 link button controls dynamically and added those controls to panel. when i build the application these 3 controls are appearing side by side but i want to display one below another.
my code is
protected System.Web.UI.WebControls.Panel p1;
ImageButton img;
LinkButton links;
LinkButton linkb;
Label l1;
private void Page_Load(object sender, System.EventArgs e)
{
Session["impath"]="pg/dhee";
for (int i = 1; i < 6; i++)
{
links=new LinkButton();
linkb=new LinkButton();
img = new ImageButton();
img.ID = "img" +i.ToString(); img.ImageUrl="pg/dhee/thumbs/"+ i +".jpg";
links.ID="ls"+i.ToString();
linkb.ID="lb"+i.ToString();
links.Text="800*600";
linkb.Text="1024*768";
l1.Text=" | ";
p1.Controls.Add(img);
p1.Controls.Add(links);
p1.Controls.Add(l1);
p1.Controls.Add(linkb);
}
}
how to do this plz help me
Thanks in advance
Haritha
|
|
|
|
|
Hi Haritha ...
U can put those controls in a table . so that u will get exactly wer do u want ...
Otherwise u can c the LAYOUT option at the top of ur IDE , in that click on "POSITION" after that click "Absolute-Postion Options " , there u can set ...
If u kw this ok otherwise it can usefull for u ...
Bye
Naresh.s.s.
|
|
|
|
|
can anybody help me with a sample task management project... Plz
|
|
|
|
|
|
hi karthik,
while i cligk the link sent by you it shows that the page has been removed
|
|
|
|
|
|
ur new url gives http 500 internal server error
if u can plz dowload and send it to me plz..
|
|
|
|
|
Hi all
In my web page i have 2 textbox's
1 is textbox.multiline (Textbox1)
2 is normal (Textbox2)
Now i want enter some text in textbox2 it will display in textbox1(multiline) it is displaying
But the scroll bar going down i want to show which is enter resently
Exapmle
if i enter
1
2
to
10 numbers
1 to 5 is showing and 6 to 10 is in scroll down i want to show the 6 to to first
Keerthi
|
|
|
|
|
kirthikirthi wrote: 6 to to first
means......
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Thx for reply
Means
Example :
----------------------------
if u enter 1 to 10 numbers or some large Text in textbox (multiline)
u can a see a scroll bar in the textbox(multiline)
In that u will see first part of the text and if u scroll down u will see
2nd part text
-----------------------------------------
I want to do is when a new text enter in the textbox the scroll bar shud autometically scroll down
Keerthi
|
|
|
|
|
Am new to ASp, i have books that Guide me well ,but i have a Problem on the Following lines. In the Following Code am trying to use the Messagebox in ASP.NET, am using visual Studio 2003
If MessageBox.Show("Do you want to save the Changes?","ContactExternalBase", _<br />
MessageBoxButtons.YESNO,MessageBoxIcon.Question) = DialogResults.Yes then<br />
The MessageBox gives me an Error
and secondly I want to navigate through the Recordset, all the neccessary steps for connection is being done and i get an Error while trying to use
the BindingContext
, it does not Appear in he Intellisense menu. <br />
<br />
Try<br />
With Me.BindingContext(Dataset11,"ContactExtensionBase")<br />
.Position = .Count - 1<br />
DisplayRecordposition()<br />
End with<br />
catch<br />
'Ignore the Errors During Navigation<br />
end try
What do you think is Wrong? , and if these Function are not Avaible For Web Application , what Functions Supposed to be there to Replace the one i mentioned
Vuyiswa
|
|
|
|
|
Vuyiswamb wrote:
The MessageBox gives me an Error
Sorry I am not telepatic, I don't know what error it gives you, how can I help with it??
Anyway, don't use MessageBox.Show() in web application, it just can't work. For this kind of thing you must use client script, e.g. javascript function alert().
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
ok, Problem Solved, on the Message Box issue, on the Following Code
<br />
intRecordPosition = Me.BindingContext(Dataset11,"ContactExtensionBase").Position + 1<br />
i want to use BindingContext Function that i use for Windows Applicatioon to Navigate through the dataset. VS underlines this BindingContext, infact in the Intellisense it does not show.
Help
Vuyiswa
|
|
|
|
|
BindingContext Class [^] is in System.Windows.Forms. Look on MSDN[^] how is data binding done in ASP.NET.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|