|
One more note
"object" is a keyword, if I remember it correctly
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Elina Blank wrote: When you retrieve your object from session, be sure to cast it, as it is returned back as string
Well, actually not a string, but an object.
---
b { font-weight: normal; }
|
|
|
|
|
You are right, thanks
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hi all,
I'm trying to save changes made to a web parts page to the db, I can add the webparts programatically but they disappear on the first postback. I've read about extending the WebPartManager class to use the SetPersonalizationDirty() function, but as I'm still fairly new to using WebParts I'm not sure how to do this.
Basically what I would like to know is how to gain access to the class itself to write an override function, or whether or not I can put the function in the existing code.
Thanks in advance for any help or suggestions, Cheers.
A humble novice,
Lil Turtle
|
|
|
|
|
Hi there,
Because the SetPersionalizationDirty is defined as below:
protected void SetPersonalizationDirty () So you cannot override this method, what you may do is to inherit from this class, and define a new public method which in turn calls the protected method SetPersionalizationDirty. The sample code looks something like;
public class MyWebPartManager : WebPartManager
{
public void ExSetPersonalizationDirty()
{
SetPersonalizationDirty();
}
}
|
|
|
|
|
Thanks for the reply, and the info. I implemented the changes you suggested and the code runs wonderfully.
Thanks again.
A humble novice,
Lil Turtle
|
|
|
|
|
Hi all,
I need to create a Web Controls Table which 3 columns namely Date, From Time, To Time.I have a button on my Web Form(parent) form which I open dialog window which has calender control and time combo.When I select the date and from time and to time,I have to display all the 3 values in the table.
Can any one tell me how do I create this table with headings and how do I display all the values??
Also I do need multiple rows I mean I do have to insert min 2 records in this table.
Please help me with the code.
Thanks in advance.
|
|
|
|
|
I created a drop downlist dynamically and i am unable to capture its values i.e its view state.
I know that view state can't be retained for dynamically created controls .pls suggest a way out to retain the view state.
|
|
|
|
|
Actually, the dynamic control can persist data in the ViewState as the static control does. The important thing when working with the dynamic control is that you need to choose the right event to readd the dynamic controls. If this happens after the ViewState is loaded, then it will loose its ViewState data. For more information, you should read about the control life cycle in MSDN.
|
|
|
|
|
if you want to see the selected value each time, it is easy...
give it an ID, say idListBox.
while creating it, get the value from form variables to determine the selected value:
...
selVal = request.forms("idListBox")
loop
create a list item
if value of the item = selVal then add "selected" to the item
add item
end loop
...
That's it...
HainKurt
|
|
|
|
|
hi all
i have a string in dd/mm/yyyy (e.g 26/06/2006) i wants to insert in database as datetime format. the data type in database is DataTime.
pls send the syntex.
thankX
Regards,
Srinandan Mall
|
|
|
|
|
First parse the string into a DateTime value:
DateTime theDate = DateTime.ParseExact(theString, "dd/MM/yyyy", CultureInfo.InvariantCulture);
Then you can use the DateTime value in the call to the database.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All,
when i want to create ASP.NET Web service i get this error
"Visual Studio not identify the version of ASP.NET on the Web server.The Web server reported the
following error when attempting to create or open the Web project located at the following
URL:'httpL//localhost/WebService1'.HTTP/1.1 401 Access Denied'.
Do you want to continue?
Yes No Help
if i click yes then i get one window Web Access Failed with three options
Retry using a different file share path
Location
Try to open the project with FrontPage server Extensions
Work offline
but in the end i cant created.
How to solve this problem?
Thanks
whitesky
|
|
|
|
|
Hi all,
I would like to create an online stock exchange trading software in ASP.Net, c# and sql server 2000 for a consultant company to display pricing list. I would like to know how can i get the online pricing list of NSE [National Stock Exchange], BSE [Bombay Stock Exchange] and Commodities Exchange.
Thanks
Naresh Kumar
|
|
|
|
|
The same i m looking for. If u get any help plz let me know the same. For more information u can add catchme_matrix@yahoo.com for yahoo messanger. Thanks
|
|
|
|
|
I want to use dropdown list in the datagrid pls tell me how to do this.
|
|
|
|
|
|
|
Dear Friends,
How can i Create Excel File in ASP.NET 2.0(2005). I want to give all the Excel sheet functionality through ASP.NET Coding . Please help me for this Solution.....................
Haridas.R
harisofttech@hotmail.com
"Achievement is not a destination, its a journey "
|
|
|
|
|
Well it is very simple to create excel files from asp.net code.
The following is the sample code to create one with font and style settings etc.
----------------------------------------------------------------------
//Write a table structure with all formatting you need (e.g. font, etc.)
string strHtml="
strHtml+= ""
strHtml+=""
strHtml+=""
strHtml+="Name | Color | Formatting | Ketan | This is Red Color Font | None | Abc | NA | None | Xyz | NA | This is bold text | "
//Clear the Response Headers
Response.Clear();
Response.Charset = String.Empty; // String.Empty();
//Set Content Type and add header
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=abc.xls;");
this.EnableViewState = false;
System.IO.StringWriter myTextWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter myHtmlTextWriter = new System.Web.UI.HtmlTextWriter(myTextWriter);
HtmlGenericControl gn = new HtmlGenericControl();
gn.InnerHtml=strHtml;
gn.RenderControl( myHtmlTextWriter);
Response.Write(myTextWriter.ToString());
Response.End();
----------------------------------------------------------------------
If you need to embed excel sheet functionality, you need to work out more.
Regards,
Ketan Majumdar.
|
|
|
|
|
Thank you Mr.Ketan Majumdar.
Haridas.R
harisofttech@hotmail.com
"Achievement is not a destination, its a journey "
|
|
|
|
|
There are a couple of ways to create the Excel document:
+ Use the Automation to create the Excel file, however this option is not recommended at the server side.
+ Create the Excel file in XML format.
+ Use a third party component to generate the Excel file without using Automation.
|
|
|
|
|
hello
as u know asp.net have different controls i want to make
datagrid as webcontrol which is use in every web forms
can u suggest me some idea for this?
|
|
|
|
|
Just follow the instructions given below
First of all,take datagrid from toolbox and paste it on webform1.aspx
1) Now Use some database to connect to table. Use its connection string.
e.g. Dim con as new sqlconnection
con.ConnectionString="Data Source=servername;Initial Catalog=pubs;User Id=sa;Password=sa;Persist Security Info=False;";
2) dim ds as dataset()
dim cmd as sqlcommand = new SqlCommand()
cmd.Connection=cn
Dim Query As String = "select * from EET_ACCRIGHTS"
'use above code for ref.
Dim MyCommand As SqlDataAdapter
MyCommand = New SqlDataAdapter(Query, con)
DS = New DataSet
MyCommand.Fill(DS, tablename)
3) Now use following code
If con.State = ConnectionState.close Then
con.Open()
End If
datagrid1.datasource=ds.tables(0)
datagrid1.databind()
If con.State = ConnectionState.Open Then
con.Close()
End If
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
Hello All,
I created a bit map and it is saved to a jpg file. The code is:-
oBitmap.Save("c:\\codes\\gen_img.jpg", ImageFormat.Jpeg);
I want the file to be given by the user(save dialogbox should come and the filename should be given by the user and the location "SHOULD BE" on the server),i.e, i need to get the location as well as the filename from the dialog box and should be given instead of the hard-coded one.
Hope Anyone can find me a Solution for this!
regards,
jeeva
|
|
|
|