|
Friends,
I'm preparing a quiz in asp.net using sql server 2005 as backend.
Now i want two things in that
1. a timer - i'm trying from last 3 days and used all methods given in asp.net
2. dynamically create panels - tried also this but no way find to create that.
help me out
|
|
|
|
|
sachees123 wrote: 1. a timer - i'm trying from last 3 days and used all methods given in asp.net
did you try with AJAX Timer Control ?
sachees123 wrote: 2. dynamically create panels - tried also this but no way find to create that.
Why ? what problem you are getting ?
Try This
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
Panel P = new Panel();<br />
Label l1 = new Label();<br />
l1.Text = "Hi All";<br />
P.Controls.Add(l1);<br />
this.Controls.Add(P);<br />
}
or any thing else ?
Let me know if any issue
cheers,
Abhijit
|
|
|
|
|
hi abhijeet,
thanks for ur supportive reply...
well i didnt try with AJAX timer control... as i dont know how to use that..., im trying to create my own timer...using c# and asp.net. Help me in while condition, that how should i control seconds....
=========================================
public void counter()
{
int sec = 60;
int min = 20;
while (min != 0)
{
while (sec != 0)
{
sec--;
TimeSpan t = new TimeSpan();
//t.Add(t.Seconds()).ToString();
lbltemp.Text = t.Seconds.ToString();
}
min--;
}
}
========================================================
and in panel what u gave is i tried but im creating an array of panel.
static Panel[] p = new Panel[10];
now if u can help me out...
|
|
|
|
|
Try This For Ajax Timer Control
Ajax Timer Control Article[^]
For Array of Panel Creation is the similar way that i have mention for a single panel. you have to create for arry of pannel .
cheers,
Abhijit
|
|
|
|
|
Hi,
I am using .net 2.0. I want to connect the db dynamically using web.config. I have to pass the db name only at runtime. The server name, uid, password are static in web.config. Please help me to implement this.
Thanks.
|
|
|
|
|
Try to use System.Web.Configuration NameSpace There is a class WebConfigurationManager .This class allow you to accss web.config programmaticaly. For Every Section in web.config there is a Class in this namespce, like For AppSettingsSection there is a class AppSettingsSection , Similary for ConnectionString There is a Class ConnectionStringSection .
You can retreive information by WebConfigurationManager.GetSection() .
Now try to explore this area what ever i mention and try to implement. if you have anmy issue then ask me !!!
Good luck
|
|
|
|
|
Hi,
I want to change the db according to the current month. I come to know that changing db in web.config at run time will restart the entire application. So, I used Global.asax to store the connection settings and i got it. Thanks for your reply.
|
|
|
|
|
Hi all,
I do want to create a template how it is........
The templates like when we are select a particular project type it will shows windows project ,webapplication templates.......like i want to creat a own template for me........
|
|
|
|
|
|
How can I incoperate the '&' sign in a connection string, at the moment it just falls over:
Initial Catalog=database(& )name;
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
modified on Thursday, October 9, 2008 6:49 AM
|
|
|
|
|
can you please confirm why are you trying to use '&' in connection string.
|
|
|
|
|
The database name has an & in it so I need to put it in really.
Any ideas?
thanks
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
|
How do i start and stop indexing service catlog or refresh it from my code
|
|
|
|
|
Check this article out:
Indexing Service
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
When I change the aspnetdb.mdf to XXXYYY.mdf in the app_data and in the web.config and try to connect using a user name and pass word I can’t access. What should I do to rename the aspnetdb.mdf database and can access secure locations. Thanks
thanks
|
|
|
|
|
Is this the database you use for the membership roles etc. You will need to find out where the orignal connection string is and change this if its possible. Personally Ive never tried.
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
did you check the connection string ?
|
|
|
|
|
Add this to your web config
<connectionStrings>
<clear />
<add name="LocalSqlServer" connectionString="your connection string"
providerName="System.Data.SqlClient" />
</connectionStrings>
Notice that name=LocalSqlServer, it must be left with that name if you want to use the membership provider with default values
Alexei Rodriguez
|
|
|
|
|
thanks for help,
the code in the web.config is
<add name="ConnectionString" connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnetdb.mdf;Integrated Security=True;User Instance=True">
providerName="System.Data.SqlClient" />
i need to host this site.so i need to change aspnetdb.mdf to other name.
what is the best solution for this problem
|
|
|
|
|
I don't know how to fix this, I tried setting:
<httpruntime executiontimeout="9000"/> but still not working.
The problem is that I'm using a Typed Dataset to call the stored procedure that actually inserts the records in the table. But the problem is that the file itself contains 11,000 records so it takes a long time to import it and then connection timeout occurs from the ISA server.
Is there anyway to fix this?
|
|
|
|
|
I want to have the following functionality..
When i type something in the box, the items matching the typed letters should be automatically detected. And, i should be able to select one from them.
I am looking for something similar to combobox.
please go thru the link..
<a href="http://easylistbox.com/demoCombo.aspx">http://easylistbox.com/demoCombo.aspx</a>[<a href="http://easylistbox.com/demoCombo.aspx" target="_blank" title="New Window">^</a>]
Can u please help me in this regard.
modified on Thursday, October 9, 2008 4:41 AM
|
|
|
|
|
This is perfect for you:
AJAXAutoComplete
Deliver yesterday, code today, think tomorrow.
"http://www.heuse.com/cphumor.htm"
|
|
|
|
|
Perfect Example
|
|
|
|
|
hi,
I m not able to read the smtp setting from web.config
here is the code
Configuration configurationFile = WebConfigurationManager.OpenWebConfiguration("/web.config");
MailSettingsSectionGroup mailSettings = configurationFile.GetSectionGroup("system.net/mailSettings") as MailSettingsSectionGroup;
if (mailSettings != null)
{
//port = mailSettings.Smtp.Network.Port;
host = mailSettings.Smtp.Network.Host;
password = mailSettings.Smtp.Network.Password;
username = mailSettings.Smtp.Network.UserName;
}
web.config:
<system.net>
<mailsettings>
<smtp deliverymethod="Network">
<network host="mail.yashsoftech.com" password="111111" username="1111@yashsoftech.com">
its always coming null values.
any suggestion why?
regards
Vijay V.
Yash Softech
|
|
|
|