|
I'm not able to understand why you are doing in this way.
How do you know that total number of user controls you are creating.
Because, if you are using if there always will be a limit.
Why cant you do something like below
<br />
int totalControl=0;<br />
if(Session["child"]!=null)<br />
{<br />
totalControl=int.Parse(Session["child"].ToString());
for(int curControl=0;curControl<totalcontrol;curcontrol++)><br />
{<br />
}<br />
}<br />
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Sherin Iranimose wrote: totalControl=int.Parse(Session["child"].ToString());//Should be always contain numbers in session.
If you aren't sure about the session content, the above method is not secure as it may throw "FormatException" if session has an invalid value. Here is a safe method
if(int.TryParse(Session["child"].ToString(),out totalControl))
{
}
|
|
|
|
|
Thanks Sherin
its working .ya you are right .plz tell now how i can take the values from user controls .and how i can retrive the values at next page .
but the condition is same .if 2 is selected then only two user control should be appear and values of these user control go to the next page.
plz send me the code
Thanks .....Again
gaurav
|
|
|
|
|
at next page i want tha values of user control should be appear in a table .i have set property in usercontrol .aspx.cs page .
|
|
|
|
|
Hi
I have some video file located on server.I want to show thumbnail of these wmv file in my web application.Now my problem is that i don't know how to create thumbnail from wmv file.
If anybody know Please reply me at ankit_jain26@rediffmail.com
Thanks
|
|
|
|
|
Hi All
I have some problem,i am working on chat application,and want to create
Push server ,can any one give me some idea or link ,how to create push server in dot net (For pooling data from client to server) ,i hope u guys understand the problem.
Thanks
|
|
|
|
|
check this out
http://www.15seconds.com/issue/971102.htm
|
|
|
|
|
Hi
Thanks man , The article is good,but my problem is still in pending,do u have any idea abt comet server,in which language i create the comet server,if u know abt that then help me
Thanks
|
|
|
|
|
hi all,
I am using application state in my project but but it will expired soon...why..please reply me.
thanks
Rajendran.AL
|
|
|
|
|
Application State will not expire until your Application is recycled. The recycling can be an IIS restart, new deployment or runtime change in web.config file.
|
|
|
|
|
Hi,
Iam trying to let the user upload through the FCKeditor from his PC.In the config.asp file I set the following:
FCKConfig.LinkBrowser = true;
FCKConfig.ImageBrowser =true;
FCKConfig.LinkUpload = true;
FCKConfig.ImageUpload =true;
in config.asp :
Dim ConfigIsEnabled
ConfigIsEnabled = True
Then I created the UserFiles in the root folder
I tried using the connector.aspx instead of the connector.asp as following:
//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/asp/connector.asp' ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx' ;
But this did nothing.
When I try to browse the server in Image Info tab I get the following error:
The server didn't send back a proper XML response.
Do any one know how to set the FCKeditor V2.2 so it let the user upload files from his PC in asp.net 2?
I am too late but i will never give up
|
|
|
|
|
Hello All,
I've been reading about Login Controls and I'm planning to practice using them, however I've come across a stumbling block. The article that I've read did not say anything about a database being involved and I'm pretty sure a database is going to be needed to store users' info before users can login. Also how does the Login Control know which database will be used to check the entered login info? Thanks in advance for your help.
modified on Wednesday, July 9, 2008 1:05 AM
|
|
|
|
|
I would always write my own login control. However, the control that's built in, fires events, you check with your data source to make sure the login is OK, and let the control know. The control also won't magically make it that a user can't view your pages without first logging in.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Here is what I'm trying to do: I have a MasterPage with a couple of HtmlAnchor controls, like this:
<a runat="server" href="~/About.aspx" onserverclick="HtmlAnchor_Click">About</a>
All I want that in the HtmlAnchor_Click method to modify the attribute of the control and remove the link from the anchor (modify the InnerHtml). But when I try to do that I get the error from the title.
Here is how I'm trying:
protected void HtmlAnchor_Click(object sender, EventArgs e)
{
HtmlGenericControl ctrl = sender as HtmlGenericControl;
string innerHtml = ctrl.InnerHtml;
}
Anyone hints?
|
|
|
|
|
Why do a postback ? I would do this in javascript.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
You can only use the InnerHtml property if the actual type of the control is LiteralControl or DataBoundLiteralControl, but your control is an HtmlAnchor.
If you want to change the contents of the control, clear the Controls collection of the control, then add a LiteralControl with the text that you want. Alternatively, if you know that it contains a single LiteralControl, get the reference to that control from the Controls collection, and change it's text.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Try this,
<a runat="SERVER" href="~/About.aspx" onclick="this.innerHTML='';">About<;/a>
Why are you wanting to do this? If you just want to hide the control you can use .Visible = false;
HTH
|
|
|
|
|
No, I do not want to hide the control. I just want to remove the link when that page is active where the anchor links to.
|
|
|
|
|
Use this inside your page_load of the master page.
string s= Page.ResolveUrl(LinkControl.HRef);
string u = Request.Url.AbsolutePath;
if( s == u)
{
LinkControl.HRef = "";
}
You can apply this logic to all of your links.
HTh
|
|
|
|
|
Thanks, that gave me some ideas.
|
|
|
|
|
I am trying to build a form using ASP.NET that will both send the form results to a database and email those results to a specific person. For example my form would include at least these items:
1. From Organization
2. Order Number
3. Responsible Organization Email address
4. Reason (Memo format)
I want the user to click a button and the data be sent to a database and also email to whatever address is ented into 3. Responsible Organization Email address.
Is this possible via ASP.NET edited using MS FrontPage?
|
|
|
|
|
farmer wrote: Is this possible via ASP.NET
Yes
farmer wrote: edited using MS FrontPage?
Apparently you can[^]
led mike
|
|
|
|
|
Ok, I am still trying to learn ASP.NET so not sure that this article from really assists me at this stage.
Does anyone have some basic sample code showing an ASP.NET form posting results to a database and emailing them to someone as well?
|
|
|
|
|
farmer wrote: Ok, I am still trying to learn ASP.NET
fair enough. I suggest you don't look for an example of doing both. One of each and then you try to put it all together. There are a massive number of .NET Database articles here on code project and I would guess there are one or more about sending email as well.
You can find the articles under the "CHAPTERS" section in the menu bar of the site on the left side of the page.
led mike
|
|
|
|
|
The email part is pretty trivial. ASP.NET also has automagic DB insert stuff that no professional dev would use, but that is perfect for your situation ( it writes a lot of the code for you ). I'd second the other response, look for articles on the DB stuff first, then worry about the email.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|