|
i have called the js file from src and from link button tried calling the function but it isnt displaying anythin..
scarface
|
|
|
|
|
scar_face wrote: have called the js file from src and from link button tried calling the function but it isnt displaying anythin..
Are you sure that its calling the JS file. Put a alert and test weather its calling properly or not.
Which Calender control are you using ? Are missing any CSS ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I built a small learning site with a dal,a bll, a stored procedure,
a database ,a detailsview,and a gridview.
I want to be able to insert itemname,description,datelised,emailaddress,phonenumber,category,and
a picture. everything does what it is supposed to do except....the picture wont show in the gridview all i get is a box with a red x
I think i need some item inserted codebehind on the page that has the gridview (the detailsview is on a different page)
I have looked everywhere for a good example scott mitchells data access
seemed good but i cant get the image to show no matter what.....
|
|
|
|
|
learningman wrote: .the picture wont show in the gridview all i get is a box with a red x
Possible reason is that the image path is not correct.
For your ref^[^]
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi All, I am using ajaxToolkit:AnimationExtender, now i want to initialize the TargetControlID property in Javascript .
Does it is possible, if so how to do it....
Expecting your valuable reply
Thanks in Advance..
|
|
|
|
|
Hi
i have one dropdownlist in which no. of themes are thier?
now anyone can select the any one of theme then that theme
will appear in my site. how can i achieve this?
for eg. as might you know in orkut user can select or change the theme
that will appear in the site.
Regards
Keyur Satyadev
|
|
|
|
|
Use
Page.Theme = themename;
on page pre init event.
for details check this...
http://www.codeproject.com/KB/HTML/ThemeChanging.aspx
The miracle is this--the more we share, the more we have.
|
|
|
|
|
I will suggest you to write a HTTPHanlder for that.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi all...
In my asp.net page i have used one tabcontainer with 3 tabs....all controls r inside this....i have used upadatepanel also..now i have placed a hiddenfield which is totally outside of tabcontainer,to fetch a value from the textbox on a button click....value is getting to hiddenfield but when am trying to take that value into javascript variable its giving nulll.(am passing that id from external jscript...)
function GetObj(id)
{
var val=this.document.getElementById(id).value;
return val;
}
can anubody tel me to get the value?....
|
|
|
|
|
I'm sure you realize, the tabcontainer adds stuff to the id of its child controls.
Like if you have a Panel1 inside a TabPanel2 in a TabContainer1 it's most likelly gonna be something like: TabContainer1_TabPanel2_Panel1. Debug it and see for yourself. Or look at the source in your browser.
Oh, and obviously, remember, if you're using masterpages, they do that too.
Disregard that, I misread your post.
var question = (_2b || !(_2b));
|
|
|
|
|
hi
I'm trying to execute a stored procedure which returns a datatable
my code is:
try
{
string conStr = WebConfigurationManager.ConnectionStrings[0].ConnectionString;
SqlDataAdapter adapter;
DataTable ans = new DataTable();
SqlConnection connection = new SqlConnection(conStr);
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "usp_GetUserDetails";
command.Parameters.Add("@UserName", SqlDbType.VarChar);
command.Parameters.Add("@Password", SqlDbType.VarChar);
command.Parameters["@UserName"].Value = user;
command.Parameters["@UserName"].Direction = ParameterDirection.Input;
command.Parameters["@Password"].Value = pass;
command.Parameters["@Password"].Direction = ParameterDirection.Input;
adapter = new SqlDataAdapter(command.CommandText, connection);
adapter.Fill(ans);
return ans;
}
catch (Exception ex)
{
throw ex;
}
when i execute i get an exception:
An attempt to attach an auto-named database for file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\WebSites\WebSite1\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be Opened, or it is located on UNC share.
i tried to look for a solution but didnt find something helpfull.
|
|
|
|
|
please change the name of your database and if you not get the
output put your proceduce here. so i will give you the code or reason
of your question? from your error its shows that name is already exist
or file should not opened.
Regards
Keyur Satyadev
|
|
|
|
|
i tried to change the database name, i even created a new empty database and tried only to open a connection, (without executing the procedure) i got the same exception.
the procedure code:
ALTER PROCEDURE [dbo].[usp_GetUserDetails]
-- Add the parameters for the stored procedure here
@UserName varchar(50),
@Password varchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
select
*
from
tbl_Users
where
UserName = @UserName and
Password = @Password
END
|
|
|
|
|
adapter = new SqlDataAdapter(command,connection);//change here
make change and try to run. this will get you the result.
if u not get the result plz debug your check and see from which
point the error should generate.
put that point and error. i am using dataset then their is
no error in my pc.
My Code Which Run Successfully is under this is only for your review.
(
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["empstring"].ConnectionString);
SqlCommand com=new SqlCommand();
SqlDataAdapter adp;
DataSet ds;
con.Open();
com = new SqlCommand();
com.CommandText = "selectrecordall";
com.CommandType = CommandType.StoredProcedure;
com.Connection = con;
ds = new DataSet();
adp = new SqlDataAdapter(com);
adp.Fill(ds);
)
Regards
Keyur Satyadev
|
|
|
|
|
my mistake, i used the wrong connection string.
thanks for the help
|
|
|
|
|
always welcome peopel who want to share proper knowledge
regards
keyur satyadev
|
|
|
|
|
i am working on mass upload of things from excel sheet to database.and i don't want to use file upload method and i have done mass upload of data from excel to gridview and i want to export this gridview data to database .... can any body post code for this ... i am using c#
|
|
|
|
|
NRHSR wrote: i want to export this gridview data to database
Loop through the records and insert each row to database. If there is going to be bulk records, you should send chunks of data to the procedure and avoid hitting DB each time in the loop.
|
|
|
|
|
how to send chunks of data can you give the code please .... i am new to asp.net
|
|
|
|
|
how to send bulk records plz..... help ...
|
|
|
|
|
|
|
Please - This forum is for ASP.NET discussions and your question has nothing to do with it. Please read the posting guidelines before you post the question.
|
|
|
|
|
Hi, i need to display the times on my webpage. They are start time, end time and the reultant time.
i wrote the following code.
TimeSpan _starttime = DateTime.Now.TimeOfDay;
TimeSpan _endtime = DateTime.Now.TimeOfDay;
TimeSpan _finaltime = _endtime.Subtract(_starttime);
Response.write("Start Time: " + _starttime + "-- End Time: " + _endtime + "-- Finaltime:" + _finaltime);
i am getting result as
02:45:27.9085452-- End Time: 02:52:59.2926579-- Finaltime:00:07:31.3841127
Here i am getting milliseconds...how to avoid this in displaying.
i want to display time as 02:45:27
G. Satish
|
|
|
|
|
Use ToString[^]. See the different pattern ToString takes.
Alternatively, you can use StopWatch[^] class.
|
|
|
|