|
But wouldn't it be nice to have databases that could fill themselves...
|
|
|
|
|
but for that also you have to take data from somewhere else. ultimately somewhere it ahould be already present. Are you trying to get that data from somewhere else, where it is already maintained?
|
|
|
|
|
Hello,
Thanks for your reply.
The following link has all the airport codes, city, and country. This is what l want.
http://www.nationsonline.org/onewor...t_code_list.htm
The airport city would have to be loaded into the combo box for the user to select from, there are over a 1000.
My question would it be quicker to load them from a SQL server or from a XML file?
Thanks in advance
-- modified at 1:46 Saturday 6th May, 2006
|
|
|
|
|
Hello Friends,
I have a datagrid on a webform. My datagrid retrieves data from a data source like the code below:
************************
SqlDataReader rdr;
SqlConnection cn;
// Put user code to initialize the page here
string strConnection="Server=.;Database=CollSuppliersTest;User ID=sa;Password=collTest06;Trusted_Connection=False";
string strCommand="SELECT * FROM SupplierOperations";
SqlConnection SuppliersConnection=new SqlConnection();
SuppliersConnection.ConnectionString="Server=.;Database=CollSuppliersTest;User ID=sa;Password=colltest06;Trusted_Connection=False";
SuppliersConnection.Open();
SqlDataAdapter da=new SqlDataAdapter(strCommand,SuppliersConnection);
DataSet ds=new DataSet();
da.Fill(ds);
dgOperations.DataSource=ds.Tables[0].DefaultView;
dgOperations.DataBind();
...
...
SuppliersConnection.Close();
********************************************************************
I have modified the column names appropriately. But How can I adjust the column widths by writing code at design time?
Please help
|
|
|
|
|
Right click on datagrid in form, select property builder, go to format and set the desired widths.
|
|
|
|
|
First Of all , I would like to say thank for your attention. I already tried your recommandation. But it did not work.
Is it something about the databinding problem?
|
|
|
|
|
In what way didn't it work?
|
|
|
|
|
I could not resize the column widths by PropertyBuilder..
How can do this at design time by writing code??
|
|
|
|
|
By any chance are your columns being autogenerated (i.e. number of columns dependant on the sql you insert)? In which case, you can't set them at design time, you'll have to dynamically set them at run time...
Or uncheck the autogenerated columns checkbox in the property builder and explictly bind your columns. You might want to head over to www.4guysfromrolla.com[^] and check out their extensive review of the datagrid.
|
|
|
|
|
the whole code that i want to convert is as:
If you could convert plz .
Public MustInherit Class ShopList
Inherits Entities.Modules.PortalModuleBase
Implements Entities.Modules.IActionable
Implements Entities.Modules.IPortable
Implements Entities.Modules.ISearchable
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Public ReadOnly Property ModuleActions() As _
DotNetNuke.Entities.Modules.Actions.ModuleActionCollection _
Implements DotNetNuke.Entities.Modules.IActionable.ModuleActions
Get
Dim Actions As New _
Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, _
Localization.GetString( _
Entities.Modules.Actions.ModuleActionType.AddContent, _
LocalResourceFile), _
Entities.Modules.Actions.ModuleActionType.AddContent, _
"", _
"", _
EditUrl(), _
False, _
Security.SecurityAccessLevel.Edit, _
True, _
False)
Return Actions
End Get
End Property
Public Function ExportModule(ByVal ModuleID As Integer) _
As String Implements _
DotNetNuke.Entities.Modules.IPortable.ExportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
Public Sub ImportModule(ByVal ModuleID As Integer, _
ByVal Content As String, _
ByVal Version As String, _
ByVal UserID As Integer) _
Implements DotNetNuke.Entities.Modules.IPortable.ImportModule
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Sub
Public Function GetSearchItems( _
ByVal ModInfo As DotNetNuke.Entities.Modules.ModuleInfo) _
As DotNetNuke.Services.Search.SearchItemInfoCollection _
Implements DotNetNuke.Entities.Modules.ISearchable.GetSearchItems
' included as a stub only so that the core
'knows this module Implements Entities.Modules.IPortable
End Function
End Class
|
|
|
|
|
|
1. Don't write in the subject that it's urgent. That information is not interresting or relevant enough to be in the subject.
2. Keep it in the same thread, in the same forum. If you feel that you need to post in different forums, link to the thread that you already started in the C# forum.
---
b { font-weight: normal; }
|
|
|
|
|
Our Instant C# VB to C# converter produces:
public abstract class ShopList : Entities.Modules.PortalModuleBase, Entities.Modules.IActionable, Entities.Modules.IPortable, Entities.Modules.ISearchable
{
//TODO: INSTANT C# TODO TASK: Insert the following converted event handlers at the end of the 'InitializeComponent' method for forms or into a constructor for other classes:
this.Load += new System.EventHandler(Page_Load);
private void Page_Load(object sender, System.EventArgs e)
{
//Put user code to initialize the page here
}
public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions
{
get
{
Entities.Modules.Actions.ModuleActionCollection Actions = new Entities.Modules.Actions.ModuleActionCollection();
Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(), false, Security.SecurityAccessLevel.Edit, true, false);
return Actions;
}
}
public string ExportModule(int ModuleID)
{
// included as a stub only so that the core
//knows this module Implements Entities.Modules.IPortable
//INSTANT C# NOTE: Inserted the following 'return' since all code paths must return a value in C#:
return null;
}
public void ImportModule(int ModuleID, string Content, string Version, int UserID)
{
// included as a stub only so that the core
//knows this module Implements Entities.Modules.IPortable
}
public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
{
// included as a stub only so that the core
//knows this module Implements Entities.Modules.IPortable
//INSTANT C# NOTE: Inserted the following 'return' since all code paths must return a value in C#:
return null;
}
}
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
For any project in ASP.net is it is neccessary to make DataSet.xsd file
or we can hard code Dataset and DataAdapter ?
Which one is good for any project and will show good performance?
Mansoor
-- modified at 6:48 Saturday 6th May, 2006
|
|
|
|
|
Hi all,
I have used some third party controls in my web application(framework 2.0).
I want to use themes in my application, so i have created one skin file. But in skin file i m not able to add any third party control. It only allow me to add asp.net control.
Please give me solution asap.
Suhas.
|
|
|
|
|
I want to use HTML editor in my project.is there any control for it in Asp.Net.
what should be the appropriate solution for me..
thanx
|
|
|
|
|
Hi
I want to print a word File and make sure that the file goes to the printing Queue of the client machine. Asp.net provides a way to process a request of printing directly from the server but in that case I dont know from which machine the request of printing is coming from. Can anyone help on that. Thanking you all in Advance.
|
|
|
|
|
I would like to have a listbox which has checkboxes next to each item so that multiple selection can be done.
It seems that checkboxList is the control that I am after but when it is populated I would like there to be a scrollbar. Something similar to listbox.
How can I get the scrollbar in checklistbox?
Thanks
|
|
|
|
|
stick it in a div and set the height and width of the div. Set style on div to be overflow:scroll;
|
|
|
|
|
Beg pardon, overflow:auto
|
|
|
|
|
|
hi
i want to tke the urls of the imges
from database and depends of number of urls
i get.
i have to display images and their description
(my ques is how to create dynamic controls)
as iam taking two imge controls initially and i have to display
no of images depends on the database .
pls it is urgent
|
|
|
|
|
i don't whats ur logic or ur problem but the simple solution or ur problem is use DataList Control to display the images.it will display ur all the images with the description by using its item template property.put image control ino item template.
and bnd the DataList control.use DataBinder.Eval expression for display the data.
i hope it might help u.
|
|
|
|
|
Hi,
I get the OOm Exception in my .Net page. I will explain the scenario.
I have a page which has part information and downloads in excel
The sample code is something like this :
strsql = <query whose="" maximum="" result="" is="" upto="" 65000="" records="">
conn.Open()
cmdpart = New OleDb.OleDbCommand(strsql, conn)
dtrpart = cmdpart.ExecuteReader
If dtrpart.HasRows Then
Dgrdpartdetail.DataSource = dtrpart
Dgrdpartdetail.DataBind()
End If
dtrpart.Close()
conn.close()
<br />
<br />
My production server has Win 2003 OS with .Net Framework 1.1 SP1 installed and has 2GB of memory.<br />
When the download for 65000 records is done the w3wp process goes upto 1.3 or 1.2 GB where I get the OOM Exception. <br />
I profiled the application in development server which has the same configuration as production except the RAM which is 1GB.<br />
But surprisingly the development server didn't give me OOM Exception as the w3wp doesn't exceep 650MB and I guess this could be because the memoryLimit in Mach.config is set to 60%. <br />
<br />
The CLR profiler details are given below:<br />
<br />
Summary for C:\WINDOWS\Temp\pipe_11332.log<br />
Allocated bytes: 108,606,257<br />
Relocated bytes: 68,575,167<br />
Final Heap bytes: 90,961,482<br />
Objects finalized: 67<br />
Critical objects finalized: 65<br />
Gen 0 collections: 123<br />
Gen 1 collections: 29<br />
Gen 2 collections: 3<br />
Induced collections: 1<br />
Gen 0 Heap bytes: 884,266<br />
Gen 1 Heap bytes: 3,637,557<br />
Gen 2 Heap bytes: 47,698,336<br />
Large Object Heap bytes: 58,901<br />
Handles created: 598<br />
Handles destroyed: 121<br />
Handles surviving: 477<br />
Heap Dumps: 0<br />
Comments: 0<br />
<br />
I am planning to change the framework to 2.0. Will that help or should I change the code. Please help me. This is very urgent.<br />
<br />
Regards,<br />
Das.
|
|
|
|
|
HI
I have a program where i want to generate master-datail relationship from dataset which has two tables and generate the XMl for this
npg
|
|
|
|