|
You should never use 'as' without checking if the resultant variable is nothing first. That's what as is for.
I've never used a FormView, but from the questions I read here, it sounds like they suck.
If you get the exception in your data layer, then your connection string must be broken.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I working with Visual Studio 2005 and Ajax Control Toolkit ver. 1.0.20229.
I'm trying to set an accordion in my web application.
The problem is that when I put on design mode, instead of the accordion, I see an error message:
"Error creating control - Accordion1
Type 'AjaxControlToolkit.Accordion' does not have a public property named 'AccordionExtender'."
The code of course can not be compiled.
My source is that:
<br />
<cc1:Accordion ID="Accordion1" runat="server" Height="50px" Width="300px"><br />
<cc1:AccordionExtender ID="Accordion1_AccordionExtender" runat="server" Enabled="True"<br />
TargetControlID="Accordion1"><br />
<Panes><br />
<cc1:AccordionPane runat="server"></cc1:AccordionPane><br />
</Panes><br />
</cc1:AccordionExtender><br />
</cc1:Accordion><br />
Is there any one with an idea to solve this problem?
Thanks
|
|
|
|
|
I think this was an issue with earlier version of Toolkit.
Try downloading the latest release and see what happens.
There is also a nice sample which gets installed in the Toolkit directory.
Try running this sample and see if Accordion control works properly here or not.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
I'm having the same problem with VS2005Std.
I'm trying to dynamically generate accordion panels with codebehind, but when I change any property in the design view, the source editor automatically inserts an AccordionExtender block within the Accordion block, causing the error you described.
Before:
<cc1:Accordion ID="acc1" runat="server" Width="300px" FadeTransitions="true">
</cc1:Accordion>
After:
<cc1:Accordion ID="acc1" runat="server" Width="300px" FadeTransitions="true" ContentCssClass="content" HeaderCssClass="header">
<cc1:AccordionExtender ID="acc1_AccordionExtender" runat="server" ContentCssClass="content"
Enabled="True" FadeTransitions="True" HeaderCssClass="header" TargetControlID="acc1">
</cc1:AccordionExtender>
</cc1:Accordion>
What is the reason for this and how can I work around it?
|
|
|
|
|
Hi i am using form view in ASP.net
when i bind using dataTable it displays only the first item and the remaining items does not appears.
Please help me what's wrong in this code which is written in button click event......
button_click()
{
ArrayList fileList = new ArrayList();
string strDirPath = Path.GetDirectoryName(Server.MapPath("./serverfiles/"));
String[] files = Directory.GetFiles(strDirPath);
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add("File_List", typeof(string));
foreach (string str in files)
{
dr = dt.NewRow();
fileList.Add(Path.GetFileName(str).ToString());
dr[0] = Path.GetFileName(str).ToString();
dt.Rows.Add(dr);
}
FormView1.DataSource = new DataView(dt);
FormView1.DataBind();
}
For Form View
---------------
<HeaderTemplate>
<table border = "5" width="400">
<tr bgcolor ="#10cccc">
<td>
<b>File Name</b>
</td>
<td>
<b>To View</b>
</td>
<td>
<b>To Cancel</b>
</td></tr>
</HeaderTemplate>
<ItemTemplate>
<tr bgcolor = "#ffcccc">
<td><asp:Label ID = "lblFilelist" runat ="server" text=' <% # Bind("File_List") %>'>
</asp:Label></td>
<td><asp:Button ID="btnDownload" Text="Download" CommandName="Download" RunAt="server"/></td>
<td><asp:Button ID="btnDelete" Text="Delete" CommandName="Delete" RunAt="server"/></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
|
|
|
|
|
kumarrpt wrote: Path.GetFileName(str).ToString();
Why do people always insist on calling 'ToString' on strings ?
Have you stepped through to confirm there are more records going into the data source ?
You're binding to a label, is this how a formview words ? I'd expect a gridview or other data bound control.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
i have a database with some relationships between my tables. when a record has deleted in one table some records in another tables that have a relation with deleted record,wll be delete.
in my local system this work perform correctly,but the problem is that in server this word do not perform correctly and when a record deleted other records on another tables that have relation with deleted record do not deleted.
how can i do this work.tell me if you know it please.
i know that here is not suitable place for sql problem but here are exist more good programmers
thank you
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
mr.mohsen wrote: i know that here is not suitable place for sql problem
That's true. Why did you ask in the wrong forum ?
You need to write a stored proc that deletes the related records. It never happens by itself.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: You need to write a stored proc that deletes the related records. It never happens by itself.
What about foreign key constraints with on delete cascade specified?
|
|
|
|
|
Are there any caveats around using HashPasswordForStoringInConfigFile? Besides its daft name, I mean, why so narrow down a perfectly reusable method? I'm storing my passwords in a database, and now I have to write a damn comment telling people, "No, it isn't actually being hashed for the config file!"
|
|
|
|
|
I didn't know there were settings for this, but I'd never use them, if I want something, I'll use the built in hashing algorithms, but I wouldn't use a built in method that defines how they are used.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes, I posted my question before really looking at that method, and it's somewhat less than confidence inspiring. I'm now using MD with salt, where that method doesn't use salt.
|
|
|
|
|
I have a helpfile.pdf in my project.whenever clickinh the help button it will popup in a seperate window.i have given like this:
private void LinkButton1_Click(object sender, System.EventArgs e)<br />
{<br />
Response.Write("<script>window.open('help/ Helpfile.pdf?a=new','','left=0,top=0,width=860px,height=600px,toolbar=0,scrollbars=1,status=1')</script>");<br />
<br />
}
it is working fine, but when i am taking the msi(exe) of the project the help file is not coming..y this happening?
Thanx in advance.
|
|
|
|
|
You need to add your PDF to your MSI ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
yes.i hav already added in my project. but cant able to see,that files whn running MSI.
|
|
|
|
|
OK - I don't know the first thing about making an MSI in VS, I use advanced installer. If it's in your project, then there must be another step to tell it to put it in the msi.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
for creating set up in vs:
go to
solution explorer>solution >newproject > add >select documentation files,primary output,content files as project output > run project in release mode > build solution .
ur msi is created in desired location.
jus written,may hav usefull 4 sme others.
|
|
|
|
|
|
HI All
I am running a website on SSL the Site works fine in my local after implementing the SSL trial certificate. but when it is run on production the the querystrings used are getting encripted. because of which the application is not working properly.
Do we have some kind of setting which can decript the querystring before passing it on to the server?
Any help will be helpful
Regards
|
|
|
|
|
Button3.Attributes.Add("Onclick", "OpenWindow();")
i want to execute some statements in button click then depending on condition my popup window should open not like deafault button click.. can any one help me in this ..
Regards
Rajkumar.
|
|
|
|
|
you can use RegisterStartupScript Block for that.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
yah i got it abhijit
ClientScript.RegisterStartupScript(GetType(Capture), "close", "OpenWindow();", True)
thanks any way..
|
|
|
|
|
I think it needs to be all lower case. Why not just add OnClientClick to the button in the aspx ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello everybody;
what does it mean ? :
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Documents and Settings\uwo\My Documents\Visual Studio 2005\WebSites\Chapter03\WroxUnited\web.config 41
|
|
|
|
|
This has been posted before and Graus gave his reference to his sig.
|
|
|
|