|
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
|
|
|
|
|
Hello,
I am using Microsoft.Web.Administration api s to handle some functionality of IIS7. How do I get Virtual Directories of a particular website( a website not an Application.)?
Please let me know.
Nana
|
|
|
|
|
Hi guys.
I have been running my aspx pages perfectly till a few weeks ago.I didnt do any configurations on my pc.Atleast not that I know of.So now I cant run any of my pages coz it tells me the page cannot be found, even when I hit the run or debug button.
Any ideas guys.Please.
Thanx in advance.
kagiso
|
|
|
|
|
|
Yes.I stopped it and then restarted it again.
kagiso
|
|
|
|
|
have u changed the location of your project? Ensure that IIS has started...
Koushik
|
|
|
|
|
IIS is started and the project is in the folder.
kagiso
|
|
|
|
|
Can you create a simple html page and place that in your virtual directory and see if you can get to that.
Also, i'd go directly to the IIS manager, right click on an aspx file and go to browse - check and see if you can see anything that way.
|
|
|
|
|
Someone said it mite be coz maybe my IIS was installed after my Visual Studio.NET so I uninstalled and reinstalled them accordingly.And again, they said I mite have to run aspnet_regiis.exe but that was not in the directory it was suppose to be in .Net framework/v1.0.3705/aspnet_regiis.exe.
I found it in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727.I still ran it and things have not changed.I still copied a simple html page onto my IIS manager and tried to connect and still I cant geddit.
Anymore ideas guys??Please help.
Thank you in advance.
kagiso
|
|
|
|
|
The alternative way you can do is create new project and add forms and pages from the previous project and try to run it..May be it work fine...
suchitamanandhar@hotmail.com
|
|
|
|