|
If you're sending the file with a response.Write, then the Response object is also used to set the MIME type. If you're not, how are you doing it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am using the streamwriter to write the file.
In start....
l_strFilename = Server.MapPath("../../" + MZKBase._SysGenExcelFilePath + l_strGuid & ".VCS")
Dim l_oWriter As System.IO.StreamWriter = New System.IO.StreamWriter(l_strFilename)
l_oWriter.WriteLine("BEGIN:VCALENDAR")
l_oWriter.WriteLine("PRODID:-//Microsoft Corporation//Outlook MIMEDIR//EN")
l_oWriter.WriteLine("VERSION:1.0")
l_oWriter.WriteLine("BEGIN:VEVENT")
l_oDueDate = TimeZone.CurrentTimeZone.ToUniversalTime(l_oDueDate)
l_oString.Append("DTSTART:")
l_oString.Append(AppendZero(l_oDueDate.Year.ToString()))
...Rest of the File...
l_oWriter.WriteLine("PRIORITY:3")
l_oWriter.WriteLine("END:VEVENT")
l_oWriter.WriteLine("END:VCALENDAR")
l_oWriter.Close()
And in the end
l_oString = New Text.StringBuilder
l_oString.Append(" Save As ")
To show the link saveas...
Bye
|
|
|
|
|
OK, you're showing a link. In that case, there's nothing you can do. You'd have to have your link redirect to code that pushes the file down with the right MIME type ( which would be just to specific that it's a file for download ), to make Firefox accept that it should download the file.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I could send "plain text" from one mail id to another mail id in ASP.net.. but if i want to send a "link" to other mail Id what should i do..??? Plse reply..
Example:
i can send foll. details:
Name:
Address:
Telephone:
Website:(plain text)
But i want to send foll. details:
Name:
Address:
Telephone:
Website:(here it should not be a plain text. It should be a link. If i click this link it should open that website)
|
|
|
|
|
If you're sending plain text, and it's being viewed as plain text, then the best you can hope is that the mail program recognises a URL and renders a link. Otherwise, if you're sending mail to a viewer that reads HTML mail, you can embed and anchor tag.
An email is just text. If a URL renders as a clickable link has more to do with the mail program on the other end, than it can hope to have to do with your code.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have two resultset comes from two datatable
For example
Datatable1
----------
Id description
-- -----------
100 Home
101 Office
102 Practice
103 Training Centre
Datatable2
----------
Id description
-- -----------
100 Home
102 Practice
I want to compare the above datatables and bind the unmatched records in the GridView
The result should be
Id description
-- -----------
101 Office
103 Training Centre
how can i get the above result?
My code
--------
DataSet dsFetchAddress = null;
DataSet dsFetchAddressType = null;
DataTable dtFetchAddress;
dsFetchAddress = m_Profile.FetchFacultyAddress(m_factultyKey);
dsFetchAddressType = m_Profile.FetchAddress();
dtFetchAddress = dsFetchAddressType.Tables[0].Select("Id! ='dsFetchAddress.Tables[0].Select("Id")'");
I don't the exact syntax.
pls give the solution.
|
|
|
|
|
Hi programmers,
i have a problem , in my webform class i have 1 property and 2 method i want to access this property and method in to my other general class that is test.vb
but i tried with creating the object of class of webform but in .net intellisence is not recognizing the class
please help me to make it work.
thanks
2) my second question is im changing the text of texbox using the javascirpt .how to use this textbox text in general class like test.vb
thanks
|
|
|
|
|
Creating an instance of the webform class makes no sense. If the property you're after can exist outside of the form ever existing, then it should be factored out into a middle tier class. And if you're trying to access a value in a web form, you need to use the form instance that is generated when someone browses, creating a new instance creates new values, not the ones you're looking for.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for your response,
My situation is like this.i have a webform which is changing textbox text based on javascriptfunction.i want to send this value to middle tier with out any postback.i m using callback but in page_load it is not taking the textbox text value to changed text
|
|
|
|
|
MD12 wrote: in my webform class i have 1 property and 2 method i want to access this property and method in to my other general class that is test.vb
but i tried with creating the object of class of webform but in .net intellisence is not recognizing the class
It's a wrong coding approach.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
In my site I have used AjaxPro library to perform method invocation on the server side without postback.
My javascript code is something like this:
function my_func()<br />
{<br />
var response = test.my_serverside_method(1,2,3);<br />
if(response.error != null)<br />
{<br />
alert('error');<br />
}<br />
else<br />
{<br />
alert(response.value);<br />
}<br />
}
In this function I have invoked the serverside method and used its result.What I want is to show a message somewhere in the page dynamically before the function my_func is invoked. But my problem is that when I try to make a change on the page for example setting the innerText property of a span tag , the change does not appear immediately .
This is the code:
SetMessage('Please wait ...');<br />
my_func();<br />
SetMessage('Data fetched !');
The function SetMessage sets the innerText property of a span tag to the argument passed.
It takes some seconds for the my_func function(its code shown) to get the data from the server. It is supposed when the above code runs first the message "Please wait ..." apears on the page and after some seconds the my_func function gives its results and then the message "Data fetched" appears. But in my case the first message is not shown at all and just the my_func is invoked and then the second message appears. How can I solve this problem ??? I hope you understand my problem . Please help me . Thanks.
-- modified at 14:33 Saturday 8th September, 2007
|
|
|
|
|
I've created a PagingIndex user control that takes a data source and allocates PageSize keys from the data source to each of a collection of PageEntry objects. Each PageEntry has a first and last property, e.g. "A - C", and I use a Repeater control with a Button as my item teplate. So, every Page entry has a button with, again, e.g "A - D" n it, if that range is <= PageSize, otherwise I subdivide, giving "Aa - As", followed by "At - Be" etc.
I currently use a one column table to contain the buttons, but was wondering, as I follow the school that asserts we should only use tables for tabular data, and not layout. What would my alternatives be for not using a table? An ItemTemplate with a <asp:button> followed by suggests itself, but a table nicely disributed the button heights over the height of the containing div of the control. It;s not a big issue using a table, but I'm just curious as to other options.
|
|
|
|
|
Brady Kelly wrote: An ItemTemplate with a followed by
suggests itself
I can't see what you mean. Use the "Ignore HTML" option when you are posting markup code.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have Microsoft SQL Server 2005 and I want to add Database to App_Data folder but it is giving me error that I cannot add because I need SQL Server Express 2005 to be installed?
Is there any way to add Database to App_Data folder?
Thanks
|
|
|
|
|
shah123 wrote: I need SQL Server Express 2005 to be installed?
Actually yes.
VS needs SQLServer runtime to work with it.
SQLServer 2005 Express included in VS 2005 DVD. install it from there.
|
|
|
|
|
But why should i install SQL Server Express as I have already SQL Server Management Studio installed?
|
|
|
|
|
Hi,
I've a IFRAME and using it as textEditor for Emails but i'm not receiving the mail as formatted text as i've done it in my IFRAME textEditor i'm just receivng it as simple text becoz i'm first containing IFRAME text in a hidden text............... Plz suggest me some other ways to do it.............
I can use some other free textEditor but suggest me something in this favour.....
Thnx
-- modified at 5:07 Saturday 8th September, 2007
|
|
|
|
|
Hey all,
I have a DropDownList control in my page.
I set the AutoPostBack property to true and also created the SelectedIndexChanged event method.
Everytime I change the index it supposes to call the SelectedIndexChanged event but it only call it when index is not zero
With the use of debugger and breakpoint at this method I realized that when the dropDownList's SelectedIndex is not zero - the event is raized but when the index is zero it ignores the event
Please help
RoyRose
|
|
|
|
|
I have another comment..
The problem was with index 0
I realizes that when I set the item in index 1 to selected = true the event not fired to it!
<br />
<asp:DropDownList ID="_TableDropDownList" ... OnSelectedIndexChanged="_TableDropDownList_SelectedIndexChanged"><br />
<asp:ListItem>cities</asp:ListItem><br />
<asp:ListItem Selected="True">courses</asp:ListItem><br />
</asp:DropDownList><br />
I set all items with Selected="False" but still when I choose the item in index zero it won't fire the event..
|
|
|
|
|
Youn can find one solution for that you can add some other listitem in place of listitem at 0 index as select or please select one or select one, or 0th index item you keep it nothing like
<asp:dropdownlist id="_TableDropDownList" ...="" onselectedindexchanged="_TableDropDownList_SelectedIndexChanged">
<asp:listitem>
<asp:listitem>cities
<asp:listitem courses<="" asp:listitem="">
|
|
|
|
|
I'm king of lost here...
this situation is very weird because the event is not fired when I select the first item in my drop down list..!
Let me tell you the exact problem:
I have a user control with a drop down list control.
This control is auto post back to server when index is changed.
When I select the second(or third, forth etc) item - the event method
_TableDropDownList_SelectedIndexChanged is being called.
When I select the first item this event isn't fired - so _TableDropDownList_SelectedIndexChanged is not being called!
I use breakpoints in this event method and also in page_load method and I can say that page_load is happend but _TableDropDownList_SelectedIndexChanged isn't. it just ignores it somehow when I select the first item...
Someone please
RoyRose
|
|
|
|
|
hello any one can provide me links for active reports for vb source code how to design checkbox and button and barcode in active reports (i.e) pdf format and when we click a link in the asp page it will invoke pdf format .Can any one tell me how to do it . any examples or any links.
Thanks in advance.
|
|
|
|
|
This is the ASP.NET forum, try the web development forum for asp questions.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Check new username availability with ASP.NET without sending request to server.can you provide me the complete code
|
|
|
|
|
Visit GridView Javascript Click Row and Ajax.
Its totally differ from ur requirement but U can accomplish ur task using this.
best Regard
Pathan
---------------------------------------------------
|
|
|
|