|
I have a datalist which has a label in the template header. The label's visibility is false initially.
After that I have the ItemTemplate
It contains a label for a date which has visible = false initially
after that I have a linkbutton for a category name.
So when the page loads it will list categories vertically header = false, date= false.
Each category is click able.
When the user clicks on a category the category name will show in the header. The label's visibility in the header is set to true. Below it will be the subcategories. The label for sub category date visibility = true and the link button is replaced with clickable sub categories instead of the main categories.
How can I achieve this functionality?
I would appreciate as many details as possible to achieve this.
Thank you for reading.
<asp:DataList CssClass="VideosDatalist" OnItemDataBound="bindDL" ID="VideosDL" runat="server">
<HeaderTemplate>
<asp:Label ID="lblVideoHeader" Text='<%# Eval("categoryName") %>' runat="server" Visible="false"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lblVidDate" runat="server" visible="false"></asp:Label><br />
<asp:LinkButton ID="lnkBtnCategory" OnCommand="VideosLink_Command" CommandName='<%# Eval("categoryName") %>' CommandArgument='<%# Eval("categoryID")%>' runat="server" CssClass="VideosDatalistLinks"
Text='<%# Eval("categoryName") %>' NavigateUrl="~/videos.aspx"></asp:LinkButton>
<div style="padding-top:20px;"></div>
</ItemTemplate>
</asp:DataList>
|
|
|
|
|
I want to install visual studio 2008 in my laptop which is in Window vista
OS, from where can i get the installation CD,is it available in net as free download software could be trial version.
Many Thanks,
Arpita
|
|
|
|
|
Arpita27 wrote: I want to install visual studio 2008 in my laptop which is in Window vista
OS, from where can i get the installation CD,is it available in net as free download software could be trial version.
Does it anything related with ASP.NET ? First read the forum guideline before post.
Anyway, you can download it from here[^]
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi,
I have a DropDownList and a ajax UpdatePanel which having MultiView with 3 View inside the MultiView.
When i select any list from the DropDownList, different view will appear.
If i set ddl_price.SelectedItem.Value; from the code-behind, the UpdatePanel will not work because in html source code, the DropDownList will write "selected".
Is there anyway to not write "selected" in html when ddl_price.SelectedItem.Value; assigned? Or is there anyway to make the ajax UpdatePanel works?
Pls help.
Thx.
|
|
|
|
|
If you only access the views through their index, the best way to do it would be :
private void ddl_priceSelectedIndexChanged(object sender, EventArgs e)
{
MultiView1.ActiveViewIndex=ddl_price.SelectedIndex;
}
Obviously, if there is some conditioning involved, as in string comparison or value comparison, you haev to include that logic before you change the ActiveViewIndex.
Also, just a reminder, remember to set the UpdatePanel's update mode to "Conditional".
Regards,
G.
var question = (_2b || !(_2b));
|
|
|
|
|
so i have a page that will have 6 [input type='file' id='unique'] controls on it and i want to process them efficiently
in my c# code behind i have something like
protected HtmlInputFile theFile;
where "theFile" is the ID of one of the [input type='file'] controls ... i'm assuming the connection is wired up automatically as it seems to work
my question is do i need a separate
protected HtmlInputFile theFile1;
protected HtmlInputFile theFile2;
protected HtmlInputFile theFile3;
protected HtmlInputFile theFile4;
protected HtmlInputFile theFile5;
protected HtmlInputFile theFile6;
for each control or is there a way of using one and looping through the controls?
thnx and i hope i explained that ok
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
|
roguemat wrote: Hope that helps
It won't help me right now, but still an interesting piece of code to bookmark
|
|
|
|
|
You need seperate controls - you need to render 6 file controls, so you need 6 controls to handle them. You CAN loop through the forms control collection looking for input controls if you like, rather than explicitly dealing with each one, that way you can change the number of controls on the form at any time and it will just work.
foreach(Control control in this.Controls)
{
HtmlnputFile file = control as HtmlInputFile;
if (file != null)
{
// process
}
}
Now, I believe for this to work, it needs to be done recursively.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
i have placed database inside App_data Folder
and connection string inside Web.config
<connectionStrings >
<add name="conString" connectionString="Data Source=localhost;database=pubs;AttachDbFileName=|DataDirectory-|\pubs.MDF;uid=sa;pwd=server"/>
</connectionStrings>
and iam using MS sql server 2000 database as beckend
iam getting the following error
Invalid value for key 'attachdbfilename'.
at below line
SqlConnection cn = new SqlConnection(ConnectionString);
can any body guide me what iam doing wrong .
Best wishes
Rameez
|
|
|
|
|
AttachDBFilename=|DataDirectory|pubs.mdf" providerName="System.Data.SqlClient"
try this
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi,
I have started to get this message on various pages when publishing my website up to webhosting. It doesn't error when running from with VS. Most of the time it shows ['title' is not a member of....], but I have also seen ['response' is not a member of...] of a response.write from within the form.
I had a search around and most of the errors seem to relate to the Partial Class Name parameter which, from what I understand conflicts with DLL names? One forum stated that all you need to do is change the value.
I have renamed these on the pages that where effected and uploaded and it is OK, but found another page coming up with the error instead. Changed this, uploaded and all OK.
On thinking everything was Ok, created another page, uploaded it and found that another page was erroring. I have now resorted to checking every page after uploading, just incase.
Is there a reason for the random problem?
Thanks
Adam.
|
|
|
|
|
Hi,
I need to open an Excel file from my asp.net page. I'm using asp.net 2003.
So I need to browse the network/select the file/then open the file with Excel.
How can I do that? Have you have an example code?
Thanks!!!!
|
|
|
|
|
Well, your best bet is to tell your users to go to file/open. browse the network and select the file. Of course, they may as well do that in Excel rather than in your web app.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
No, I need to do this into ASP.net, because I need to save the path into an string and then to a file....
Thanks!
|
|
|
|
|
Well, you kind of can't. The best you could do, is have a file upload control, upload the file to the server, and then send it back down again. The only file browse dialog you're going to get, is the upload control, you will have to upload the file in order to get the path through to the server.
But, you say you want to save the file, so you obviously need to upload it. why didn't you just do that, what were you trying to ask ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi i am using Visual studio 2008 and i am very new to visual studio and ASP.NET..
i am developing a login page,here i got login form or control facility in VS 2008,but how to use them,can any body help me with the code..
|
|
|
|
|
I would recommend you learn some basics of C# or VB first, then learn how basic page layout works in ASP.NET, then move on to advanced stuff like login pages.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello sir,
I'm using visual studio 2005. There is no ajax tools. How can i use AJAX tools in my programs?
|
|
|
|
|
With Visual Studio 2005, you have to download the ASP.NET AJAX libraries from here[^].
Then just google for UpdatePanel to learn how to use it. It's pretty easy.
|
|
|
|
|
hi,
to use ajax in visual studio 2005 you need to install ajax toolkit to your system.
then you can use ajax tools in your application by adding reference of that dll to your application from GAC.
praveen.
|
|
|
|
|
AJAX is a framework that's built into your browser. All you need to write AJAX code is a text edition, and VS2005 is more than capable of doing it. Of course, if you don't want to learn AJAX at all, but just use an existing framework to generate code you don't understand, then download the MS library.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
U have to download the Ajax tool kit and msi setup file.
Download the <b>ASPAJAXExtSetup.msi</b> file from the below site to support Ajax in Asp.Net.
http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en[^]
Download the Ajax control toolkit from the below site.
http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?ReleaseId=16488[^]
In the above page, at the top right corner u can see the topic Releases in a box. Click the link 20229. It redirects to another page. Select AjaxControltoolkit.zip under the topic Downloads&Files.
Run the msi file.
Follow these steps to add the ajax control toolkit to ur application:
1. Create a folder AJAX Control Toolkit at path C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions or the drive where you have installed the Windows on PC.
2. Then extract the files of downloaded Control Toolkit .zip inside new created folder.
3. You will get the following folders and files from the extracted items:
o AjaxControlExtender
o AjaxControlToolkit
o Binaries
o SampleWebSite
o TemplateVSI
o ToolkitTests
o AjaxControlToolkit.sln [Visual Studio Solution file]
4. Double click on AjaxControlToolkit.sln solution file to open it in Visual Studio 2005. It will show a security warning with two project load options:
o Load project for browsing
o Load project normally
5. Select load project normally and click ok.
6. After loading the solution it will display AJAXControlToolkit, SampleWebSite, ToolKitTests, TemplateVSI in the solution explorer.
Right click on TemplateVSI and click build. After successful compile and build go to the path X: or C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\AJAX Control Toolkit\TemplateVSI\bin
At this path you will get the fresh build of AjaxControlExtender.vsi
7. Next Right click on SampleWebSite in the solution explorer and Build Web Site to get the fresh copy of AjaxControlToolkit.dll.
You will get the fresh AjaxControlToolkit.dll at :
X: or C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\AJAX Control Toolkit\SampleWebSite\Bin
Note: You can see all the Control Toolkit components included in this framework by right clicking on above SampleWebSite in solution explorer --> select view in browser. It will show the sample web site showing the demo of all AJAX control toolkit components.
8. Now you are ready to add the Control Toolkit in your Visual Studio 2005.
First of all go to TemplateVSI bin folder discussed in step 6 and run AjaxControlExtender.vsi. This installer will install the ASP.Net web template that will enable you to create AJAX Control Toolkit Web Site.
9. After installing AjaxControlExtender.vsi, open the Visual Studio 2005 and go for New Web Site, there you will see a new My Template item as AJAX Control Toolkit Web Site, select it and create a new website.
How to include AJAX Control ToolKit Components in Toolbox
It’s also simple to add Toolkit on Visual Studio Toolbox. In the above new AJAX Control Toolkit Web Site, move your mouse on Controls Toolbox at right side and create a new Tab with name AJAX Toolkit. Then right click under the AJAX Toolkit tab and select choose items, this will open Choose Toolbox Items dialog box. Click on browse button at bottom and select the AJAXControlToolkit.dll file at this path: X: or C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\AJAX Control Toolkit\SampleWebSite\Bin
It will populate the AJAX controls into the AJAX Toolkit tab.
When creating a new website select AjaxEnabledWebSite from the template side in VS 2005.
|
|
|
|
|
how to verify and validate password that user have entered with the password in our database..
|
|
|
|
|
I am sorry but I might not be understanding the difficulty here. Wouldn't you query the database, with the supplied UserName and Password, on the table which stores the user information and verify if a record exists ?
Select Count(*) from YourUserInfoTable where YourUsernameColumn = CurrentSuppliedUsername and YourPasswordColumn = CurrentSuppliedPassword
Or
Select * from YourUserInfoTable where YourUsernameColumn = CurrentSuppliedUsername and YourPasswordColumn = CurrentSuppliedPassowrd
|
|
|
|