|
I think you have a bit of a logic error, c.ID will never be null. You also have an unnecessary recursion with the if(c.Controls.Count > 0)
All you need is
foreach(TextBox txt in Panel1.Controls)<br />
{<br />
<br />
}
only two letters away from being an asset
|
|
|
|
|
I got the error as
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
|
|
|
|
|
TextBox txtbox = (TextBox)c;
You are trying to cast every control in the collection to a TextBox, including the LIteralControl, of course you will get this error. A Literal is not a TextBox
foreach(TextBox txt in Panel1.Controls)
This only gets you the TextBox controls in the collection
only two letters away from being an asset
|
|
|
|
|
It is throwing the error in the previous line itself
|
|
|
|
|
I need to programmatically create a folder on the server. Is this possible, and how do i go about it please?
I cant find anything about this on Google!
Your help is greatly appreciated.
Thanks!
|
|
|
|
|
somehting like
Private Function CreateFolder(ByVal FolderName As String) As String
If (Not Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & FolderName)) Then
Dim oDirectoryInfo As DirectoryInfo
oDirectoryInfo = Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory & FolderName)
End If
Return FolderName
End Function
|
|
|
|
|
Thanks for the example. Ill give it a try shortly.
|
|
|
|
|
Hi I have been google from 2 days for proper guidance, How can i configure fckeditor file upload with asp.net. plz give me step which and how files should be change
|
|
|
|
|
Have you solved this? There is an article on this site about fckeditor that might help...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
How to rotate div(text) with the use of javascript
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
|
Hi
I need to Render the Datatable data into the Table Html Format.
Please tell me.
Thanks
Avesh
|
|
|
|
|
use the gridview for bind datatable
then use render method of gridview for generate html
Best Regards,
Trishul Tandel
Software Developer
|
|
|
|
|
Hello Genious..
Here is one Interesting Point for you..
I have done some codding for reading Microsoft Project Plan(.mpp) file after browsing from client's pc..
Means user can select any .mpp file from his local drive and my code displays this mpp file in gridview.
Code reads whole .mpp file well in my Project and also when i am publish this project , code reads from even published version from IIS.
But when any other user try to use this application
Error comes "Project can not open file"
and
also throws "System.Runtime.InteropServices.COMException" Exception..
Can AnyBody help me a little how to solved it.. Any help will be apreaciated...
|
|
|
|
|
Can anybody tell me how to show the image
]]>"........>
|
|
|
|
|
<img src="<%= Page.ResolveUrl('~/Imgaes/Back1.jpg) %>"> </img>
Best Regards,
Chetan Patel
|
|
|
|
|
Still Not working
<img src="<%= Page.ResolveUrl('~/Imgaes/Back1.jpg') %>"> </img>
giving a compilation error as given below
Compiler Error Message: CS1012: Too many characters in character literal
|
|
|
|
|
In ASP.NET, we have a download handler. We use this to send files to the users that they should be prompted to either Open or Save, rather than show inline in the browser. Through a combination of a couple sets of code, we ended up doing the equivalent of:
/* anti-cache code */
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.MinValue);
/* download prompt code */
Response.AppendHeader("Content-Disposition", "attachment; filename=" + ff.OriginalName);
This tells the browser not to cache the results (first set of code), and to give the Open/Save prompt (second set of code). Unfortunately, because of the way IE is architected, it always downloads to its cache, and then when the download is complete, puts the end result file in the right place. Logically speaking, IE put itself into a place architecturally when it would NOT permit the file to be downloaded.
how can I handle it in asp.net
I want to do these two things..cache clearing for disabling back button and downloading
|
|
|
|
|
I know this may not be the correct forum but its a simple question and I tend to get a quikcer response here!
what is the short cut to start sql seerver if i go to START - RUN
thanks in advance
|
|
|
|
|
|
This doesn,t work with me
|
|
|
|
|
Hi All ASP.NET Gurus
I am trying to find a way to use Session Variables for caching multiple copies of a user control in a web page.
I know we can use QueryString values as well as Control ID's in the VaryByParams option in the user contol file.
But what about session variables? That way I do not have to fill me querystring with too much info?
Any Ideas?
Thanks in advance!
Josh Coswell
http://riverasp.net
|
|
|
|
|
I would personally loop al the controls and then store as session variables, that is my preferred choice, obviosuly the session variables can expire though
|
|
|
|
|
Hi every one!
I'm making a composite web custom control which includes an ImageButton so I want to access it's Click event in design mode in property. I have some code like below in my program and it works! but when in a web page I use the event method both of my control event method in web pge and my control event method in the control library class run, but I want some thing like overriding it!
thanks for any help
here is the code:
//in my constructor:
_imageButton.Click += new ImageClickEventHandler(_imageButton_Click)
//and then:
public virtual void _imageButton_Click(object sender, ImageClickEventArgs e)
{
if (Convert.ToInt32(_rowID)!= -1)
{
_textContainer.Text = _tableAdapter.GetData()[Convert.ToInt32(_rowID)].FDtext;
}
}
//so I defined my event like this:
[Browsable(true)]
public event ImageClickEventHandler TitleClicked2
{
add
{
_imageButton.Click += value;
}
remove
{
_imageButton.Click -= value;
}
}
|
|
|
|
|
this seems like a vary clunky way to code what your trying to do, any1 else agree?
surely you just have the onclick event and then the button and thats it
|
|
|
|