|
How can i close firewall on host?
|
|
|
|
|
i mean you have to close the firewall of the computer where your sql server resides.If your sql server is in the host computer, then you have to request them to close....or change some configuration in the firewall so that firewall recognizes your sql server.
suchitamanandhar@hotmail.com
|
|
|
|
|
Hi,
I am new to ASP .Net.
I was going through the Page LifeCycle in ASP .Net 2.0 and what I found was a lot of events like
TestDeviceFilter()
AddParsedSubObject()
OnInitComplete()
OnPreRender()
OnRenderComplete() etc. that can be overridden.
What I want to know is where would one override these events, I mean in what scenarios.
Any help would be appreciated.
Aakar.
|
|
|
|
|
|
I need to convert the row entries to column in dataset.
Eg:
emplid assigned to
xxx work1
xxx work2
yyy work2
my dataset shud be changed to
emplid work1 work2
xxx checkboxchkd checkboxchkd
yyy notchecked checkboxchkd
to bind to grid.
There are two different ways am considering. One is the stored proc on sql and the other is C# class. Which would be better in performance?
Thanks for help.
Thanks
|
|
|
|
|
If you are using sql server 2005 then you can use the pivot command. If not, I would use ado.net. Create a dataTable with the proper columns and use a data reader to populate it. I don't think the C# is more efficient, but it sure is easier. Writing complicated stuff is SQL tough to debug and generally more difficult to follow.
How many rows are you going to be pulling back? If you have 1000s of rows you are probably better off using a user defined function in SQL for performance, but if you have 50 or less rows, it won't matter how you do it and the C# will be much easier to maintain / modify / debug if you need to.
I didn't get any requirements for the signature
|
|
|
|
|
I am using database MSSQL, i have also installed MySQL throught ODBC driver. I Know these databases sql queryies are a diffrent, but does a certan controll/class/dll exsist to translate query betwen them? If it doesnt it's not a big problem.
|
|
|
|
|
Queries are not different if you use standard sql in your app...
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
hi this is velu
i need to display the date and time in my web application in ASP.Net with C#,
i created in Server side. But it is a web application, several user use this,so server get the request in every second(performance is low).
i need clientside date and time.
how to create please reply soon
|
|
|
|
|
just google javascript date time counter. You should find something.
I didn't get any requirements for the signature
|
|
|
|
|
Can you suggest me ways to look at the entire dataset or datatable on the immediate window?
Thanks
|
|
|
|
|
If you're using VS 2005, try hovering over the datatable variable and then clicking the little magnifying glass icon when it pops up.
|
|
|
|
|
Hi,
I have a drop down list in a:
<asp:CreateUserWizardStep ID="CreateUserStep1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlTitles" runat="server" />
I need to populate this drop down list. I am having some issues because normally I would do it like:
private void BindTitles()
{
ddlTitles.DataSource = Title.GetAllTitles();
ddlTitles.DataValueField = "ID";
ddlTitles.DataTextField = "Name";
ddlTitles.DataBind();
// Insert a "None" choice
ddlTitles.Items.Insert(0, new ListItem("None", String.Empty));
}
But because it is in <ContentTemplate> I need to find the control, something like CreateUserStep1.ContentTemplateContainer.FindControl("ddlTitles")... But I do not know how to populate it. In BindTitles() I changed it to create a drop down list control and populated this control the samwe way, but I need to assign this control to ddlTitles. I don't know how to do this.
Please can someone help me??
Thanks
|
|
|
|
|
You're pretty close...
<br />
Control cltrFound = ....FindControl("YourControl");<br />
if (ctrlFound is DropDownList)<br />
{<br />
DropDownList ddlToBind = (DropDownList)ctrlFound;<br />
BindTitles(ddlToBind);<br />
}<br />
<br />
private void BindTitles(DropDownList ListToBind)<br />
{<br />
ListToBind.DataSource = Title.GetAllTitles();<br />
ListToBind.DataValueField = "ID";<br />
ListToBind.DataTextField = "Name";<br />
ListToBind.DataBind();<br />
<br />
ListToBind.Items.Insert(0, new ListItem("None", String.Empty));<br />
}<br />
That mey help you get even closer
|
|
|
|
|
Thanks for this, it really helped!!
|
|
|
|
|
I have an file management tool that has just one problem that I can not figure out. The files are stored in an MsSQL 2005 db and can be retrieved with no problem. The problem comes when the response object renames it. Example if the file is name "file 1.doc" then when the IE response sends it to the client it is renamed "file_1.doc" but FF renames it "File" with no "1" or file extension rendering it useless.
Any ideas on what could be causing this and what can be done to stop it?
-Al
|
|
|
|
|
Are you setting the filename in the response?
Something like:
Response.AppendHeader("content-type", "inline;filename=file.doc")
|
|
|
|
|
no, I have
Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)
I tried using inline vice attachment - but there was no difference.
-Al
|
|
|
|
|
Can dropdown list be put on gridview bound column? Many places, I read that it has to be converted to template column to put a dropdown. Can you please help with this?
Thanks
|
|
|
|
|
The following is sample code:
<asp:TemplateField HeaderText="ColumnName" SortExpression="ColumnName">
<asp:ItemTemplate>
<asp:Label ID="lblColumnName" runat='server' Text='<%# Eval("ColumnName") %>'></asp:Label>
</asp:ItemTemplate>
<asp:EditItemTemplate>
<asp:DropDownList ID="cmbColumnName" runat="server" DataSourceID="SqlDataSource1" DataMember="TableName" DataTextField="ColumnName" DataValueField="ColumnName" SelectedValue='<%# Bind("ColumnName") %>'></asp:DropDownList>
</asp:EditItemTemplate>
</asp:TemplateField>
|
|
|
|
|
Thanks for the code. But, can we put dropdown list on Bound Column of GridView in a web form?
Thanks
|
|
|
|
|
You may not use <asp:BoundField> with the dropdownlist. When using the templated controls the means to bind is: '<%# Bind("ColumnName") %>'
|
|
|
|
|
In my application I have a bulky .aspx page, it has UdatePanels and on every post back through UpdatePanel it performs complex calculations on server as well as renders almost 50 controls again at UI.
I am facing following performance issues with my application
1. Application works fine on all other pages but on above mentioned page it’s very slow and often gives timeout exception.
2. On similar page if there are 3-4 concurrent user then ASP.NET worker process starts using almost 100% of CPU. (considering the RAM on server is 2GB)
3. I am creating and maintaining a session object on this page which fetches values form database and it’s size is around 500 KB, it's compusary for application and cannot be avoided.
I have tried a lot but couldn’t found the performance bottleneck; can anybody please suggest how can I fine tune applications performance for given page?
|
|
|
|
|
Do you realy need all 50 controls on page, or you coud use as wizzard?
Did you disabled debug mode in Web.Config?
Did you used publish site in Visual Studio?
Did you configure iss? I Think it is in General Tab a combo box, Currently i cant accsess to my computer where i have iss.
|
|
|
|
|
Mukesh Kumar Gupta wrote: complex calculations on server as well as renders almost 50 controls again at UI
Well, I would say this is a clue.
Why do you need to re-render 50 controls? Just update the ones necessary, or reduce the number of controls on the page. I would reconsider the 500KB session object also.
only two letters away from being an asset
|
|
|
|