|
Hi,
My application should provide an option for the user to add a new .resx file dynamiccaly(In runtime) . Suppose the application right now support only english and the customer wants to add spansh later.He will create a .resx file for spanish using a transalator and form my application he should be able to upload it to App_GlobalResource so that from there onwards my application can be displayed in spanish also.This should happen without touching the code
Thanks,
Prajn
|
|
|
|
|
Hi
I am trying to generate a XML file from a SQL Server table's data in a formatted way.
I'm struggling to start.
Please suggest me an example.
I have not failed. I've just found 10,000 ways that won't work. -Thomas A. Edison
Thank u
Chandu
|
|
|
|
|
chand10 wrote: I am trying to generate a XML file from a SQL Server table's data in a formatted way.
select * from tablename for XML auto
This will give you XML output. Get this into a dataset and use dataset's WriteXML method to write it to XML file.
|
|
|
|
|
I am facing strange problems while working in VS.NET, when I try to debug the program by putting a break point on a event method of the button click and than run the ASP.NET application and click that paticular button than instead of running in the debug mode it proceeds normally without giving me chance to press F10 and proceed,it behaves that as if no break point has been inserted.
|
|
|
|
|
Did you run your application by pressing "Control + F5"??
Did the configuration of your project is set to "release" mode?
Button Click event is in Server-side or client-side?
|
|
|
|
|
How you started application ? Using F5 or Ctrl + F5 . First one will stop when it see break points. Second one won't do this
|
|
|
|
|
Navaneethn and Micheal thanks for your replies,
I am running the application by pressing the run button in VS.NET, I am working in Debug mode and not in release, one point worth mentioning here is that whenever I create some new asp.net project and run it for the first time I get the following errors due to some unknown reasons:
"Error while trying to run project:Unable to start debugging on the web server.The COM+ registry database detected a system error.Would you like to disable futureattempts to debug ASP.NET pages of this project".
If select yes than it proceeds running the page but disables the debugging and if I slect no than it does not not proceeds.Also please note here that when I run some windows application in C# and inserts the breakpoint than it runs normally witout any error which means that there are no problems in VS.NET, can you people please tell that what does the above message means and what is the solution.
|
|
|
|
|
Actually I am not much familiar with this error. But I got a link in MSDN which is similar to this ? Try this[^]
|
|
|
|
|
Hi i am using one stored procedure...,
i am passing month value and year value to that procedure...,
So i am getting a month all dates...,
Its i checked with query analyzer...,
Now my question is,
I try to display those dates in my datagrid...,
So i have created one boundcolumn, in that i try to display those dates...,
But its displaying first date only...,
Becoz each and every loop its creating the date name as startdate...,
How to solve this probs...,
This is my stored procedure:
CREATE PROCEDURE datetesting
(
@months as tinyint,
@years as smallint
)
As
DECLARE
@startDate datetime,
@nextdate datetime,
@endDate datetime
begin
SET @startDate = CAST( CAST(@years AS varchar(4) ) + '0101' AS datetime )
SET @startDate = DATEADD( m, @months - 1, @startDate )
set @enddate=dateadd(m,1,@startdate)
set @enddate=dateadd(d,-1,@enddate)
select @startdate as startdate
if @startdate < @enddate
begin
SET @nextdate = DATEADD( d, 0, @startdate )
set @startdate=dateadd(d,1,@nextdate)
select @startdate as startdate
end
Advance thanks,
end
GO
Regards,
Magi
|
|
|
|
|
You need to use SQL Server temporary tables. Store your results into a temporary table and select that table at the end of procedure.
|
|
|
|
|
No i am getting all dates in query analyzer in this format:
startdate
2007-06-01
startdate
2007-06-02
.
.
startdate
2007-06-30
means its displaying like separate separate table...,
So how to merge the datas?,
and how to store it in temporary table?,
and how to retrive it from that tenporary table?,
If data's will come the following format then i will get proper answer..,
Startdate
2007-06-01
2007-06-01
.
.
2007-06-30
Regards,
Magi
Regards,
Magi
|
|
|
|
|
You could change your procedure something like this (Not exactly, may be you need to change something in this to work it out for your requirement).
CREATE PROCEDURE datetesting
(
@months as tinyint,
@years as smallint
)
As
DECLARE
@startDate datetime,
@nextdate datetime,
@endDate datetime
create table #temp(startdate datetime)
begin
SET @startDate = CAST( CAST(@years AS varchar(4) ) + '0101' AS datetime )
SET @startDate = DATEADD( m, @months - 1, @startDate )
set @enddate=dateadd(m,1,@startdate)
set @enddate=dateadd(d,-1,@enddate)
insert into #temp
select @startdate as startdate
if @startdate < @enddate
begin
SET @nextdate = DATEADD( d, 0, @startdate )
set @startdate=dateadd(d,1,@nextdate)
insert into #temp
select @startdate as startdate
end
select * from #temp
drop table #temp
|
|
|
|
|
Hi now i am getting first two dates only...,
Becoz, when i am exec that procedure...,
the values going to if condition...,
there its creating 29 tables...,
each date in separate separate table...,
So if we give #temp its binding only first 2 dates
How to solve that probs...,
see,when i am exec that procedure i am getting output like this,
startdate 'one table
2007-06-01
startdate 'second table
2007-06-02
.
.
startdate 'last table
2007-06-30
means its displaying like separate separate table...,
So how to merge the datas?,
and how to store it in temporary table?,
and how to retrive it from that tenporary table?,
Regards,
Magi
|
|
|
|
|
<br />
EXEC datetesting 1,2007<br />
Are you sure that the sp works fine?? I think ur sp return only first date.
|
|
|
|
|
No i am getting all dates in query analyzer in this format:
startdate
2007-06-01
startdate
2007-06-02
.
.
startdate
2007-06-30
But if it will come the following format then i will get proper answer..,
Startdate
2007-06-01
2007-06-01
.
.
2007-06-30
Regards,
Magi
|
|
|
|
|
can we stop the postback of (page(aspx) or div) through javascript
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Could you please tell us the example why you wanna do like that?
Normally, if you dont wanna have the postback in your page, you can use HTML controls in your page or avoid "Form.Submit()" function.
|
|
|
|
|
i using div (scroll bar) for chat window.and chat window text retrieve from hash table and hash table refresh by ajax timer(in 1 sec.) so page alwas post back so i cnt manage scroll bar freely plz help
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
In javascript function use return false; . Call your javascript function like return Function(); . This will stop posting the form
|
|
|
|
|
I've a comobbox and i'm fill this comobbox like this:
===========================================================================================
oleDbDataAdapter1.Fill(dataSet31);
dpdhead.DataSource = dataSet31.Tables[0].DefaultView;
dpdhead.DataTextField = dataSet31.tbacdes.ac_headColumn.ToString();//Display Heads
dpdhead.DataValueField = dataSet31.tbacdes.ac_idColumn.ToString();// Heads Ids
dpdhead.DataBind();
===========================================================================================
and than i want to get Comobbox select item head id. But when i select the comobbox value page refresh, first time it return head id but when i again select a value i got an javascript error like this:
====================================
Error: Invaild Syntax
Code: 0
====================================
And comobox stop working. and page doesn't work.
Please help me out in this matter (Urgent)
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
|
hi!!!!
i have a project on dicussion forums... first i gave options like good,bad and worst for rating if the user select an option it is stored in database. now i have a problem in Displaying the rating..how to bind the data to the label now..
Advance thanx 2 helpers..
harika
|
|
|
|
|
I am not getting what is the problem you are facing when binding the data ? Please be more specific to your problem
|
|
|
|
|
in my raing forum i took a button rate when ever i clicked on that... this z the following code in that...
if (Page.IsPostBack)
{
string x;
x = rbtnRating.SelectedItem.ToString();
if (x != "")
{
switch (x)
{
case "Excellent":
strRate = "5";
break;
case "Good":
strRate = "4";
break;
case "Average":
strRate = "3";
break;
case "Bad":
strRate = "2";
break;
case "Terrible":
strRate = "1";
break;
}
btnRate.Enabled = false;
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["KMSConnectionString"]);
con.Open();
string str = "insert into Rating(Rate,Authorname,Replies,QId) values('" + strRate + "','" + btnName.Text + "','" + lblReply.Text + "' ,'" + btnSno.Text + "' )";
//string strT="count
SqlCommand cmd = new SqlCommand(str, con);
DataSet ds = new DataSet();
cmd.ExecuteNonQuery();
con.Close();
now the problem is how can i retrive the data to label like is the user gets 5 points i want to calculate the total replies rated.....how to bind this to my label.
harika
|
|
|
|
|
Normal rating will be calculated for a message will be like taking the average of score. So you need to calculate the average with total users rated and score. Then show this to label. To make the calculations more easier, use stored procedures. If you are using a normal query, you need to get the results into some datatable and then do the calculations. Stored procedures allows you to do all these calculations inside it.
|
|
|
|