|
i try to add the windows media player control through
toolbox
right click
choose items ans com
selct the windows media player
but that not apper in my tool box where it is available
Kiran Kumar.P
|
|
|
|
|
|
Hi Kiran,
Toolbox-->Right click-->show all-->select standard tab--> At bottom u can see....
Plz reply.....
Regards,
Syed Arif.
|
|
|
|
|
No...There is no media player control.Any ideas will be helpful
Thanks in Advance...
|
|
|
|
|
If Application("TipDate") <> Today() Then
Application("TipDate") = Today()
If Not IsNumeric(Application("TipNumber")) Then
Application("TipNumber") = 1
Else
Application("TipNumber") = Application("TipNumber") + 1
End If
End If
I have given the above code in the page and i want to store Application("TipNumber") and it has to increment daily depending up the Date Value.
So, i have placed the Appliaction("TipNumber")=1 in Appliaction_Start of Global.asax but when ever the appliaction is running TipNumber is initialised to 1 only but not incrementing?
Please help me in solving this problem
|
|
|
|
|
This logic probably won't work since the Application_Start event is fired only once when the application starts, Not on everyday basis.
Regards - J O H N -
|
|
|
|
|
Thanks for ur reply but if i want it in daily basis how to do the coding? pls help me
|
|
|
|
|
Could you provide some more detail about what exactly is the requirement?
Regards - J O H N -
|
|
|
|
|
Application("TipNumber") = 1
If Application("TipDate") <> Today() Then
Application("TipDate") = Today()
If Not IsNumeric(Application("TipNumber")) Then
Application("TipNumber") = 1
Else
Application("TipNumber") = Application("TipNumber") + 1
End If
End If
Dim cmd As SqlDataAdapter = New SqlDataAdapter("Select Thought From Thoughts_Tbl " & "Where id = " & Application("TipNumber"), Con)
cmd.Fill(_dataSet, "TheTip")
If _dataSet.Tables("TheTip").Rows.Count = 0 Then
Application("TipNumber") = 1
cmd = New SqlDataAdapter("Select Thought From Thoughts_Tbl " & "Where id = " & Application("TipNumber"), Con)
cmd.Fill(_dataSet, "TheTip")
End If
lbl_Title1.Text = "Thought of the Day :"
lbl_ThoughtText.Text = _dataSet.Tables("TheTip").Rows(0).Item("Thought")
This is the actual code where i'm check the date with today's day if it matches and the TipNumber is not numeric it wil take first statement Application("TipNumber") = 1 or if TipNumber is numeric i.e having some number, it wil be incremented in else part Application("TipNumber") = Application("TipNumber") + 1
but TipNumber which is incrementing is not saving? Now how to save TipNumber n incrementing it and get the next "TipOfDay" from database?
Pls help me with some solution
|
|
|
|
|
Having this Data in the Application Variable is pointless. Application_Start Event is not meant for this. This will not serve your purpose.
Why don't you have a Date Column to the Thought's Table and fetch the Tip based on the Date. I think this would be the appropriate solution to the given problem.
Regards - J O H N -
|
|
|
|
|
You need to persist the value somewhere, ie a database, along with the datetime it was written. Then, perhaps in an onsession event, read this value from the database, compare the date it was written with 'todays' date, and update if necessary.
If you don't persist the value, if you site ever goes down, or you modify the webconfig, or the process gets recycled for any reason, you will lose this value.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
hello everybody
this is the second time i put the same message.
I am using vb so vb code will be graet full.
my ddl data is coming from sql server 2005 database, if antything from ddl1 then corresponding data will fill ddl2.
do i need a xml document for this? if yes then how can i do it?
Please do not read the beginner one. If you know the guideline please tell me step by step information.
Thanks in Advance
Sarfarj Ahmed
|
|
|
|
|
Step 1: On the Page Load Event, Populate the First DropDown.
Note: In Page Load Event Add (IF Not Page.IsPostBack) and write the code in it.
Step 2: Enable the PostBack Property of the First DropDown
Step 3: On the SelectedIndex Change of the First DropDown, write the Code to Populate the Second DropDown by passing the Selected value of the First Drop Down.
Regards - J O H N -
|
|
|
|
|
Dear John
Thanks for your instruction,
Problem is, if selected index change from FIRST DDL then refreshing the whole page.
Only SECOND DDL will refresh not whole page.
thanks
Sarfarj Ahmed
|
|
|
|
|
Do you mean that you want avoid the Page Postback while Populating the second DropDown? If yes, try to implement AJAX which will send a request to the server and do the task without posting your page.
Regards - J O H N -
|
|
|
|
|
thanks john
i have solved my problem
Sarfarj Ahmed
|
|
|
|
|
I have been trying to modify a code that had 4 questions to 3 questions. I get no errors whatsoever when I build the webiste. Only issue is, The TYPE page that should assign a type to the user based on what answers were chosen doesnt show anything when it loads only the button that allows the user to choose a present. How do I fix this. I am totally new to .NET I can easlily amil the project if someone is willing to help..thanks
Cruisar
|
|
|
|
|
hi,
In my appication i'm using Oracle as a back end. In that when i'm using ExecuteReader() it shows an exception. Can any one of help me to solve this issue.
<br />
oleDBConnection = new OleDbConnection(connectString); <br />
string query = "SELECT V_FIRST_NAME,V_LAST_NAME,V_PHONE_NUMBER,V_EMAIL,V_FAX_NUMBER,V_ADDRESS,V_TITLE,V_POSTAL_CODE,V_COUNTRY from UserDetails where (V_USER_ID = ?) AND (V_PASSWORD = ?)";<br />
<br />
OleDbCommand oledbCmd = new OleDbCommand(query, oleDBConnection);<br />
oledbCmd.CommandText = query;<br />
<br />
oledbCmd.CommandType = CommandType.Text;<br />
<br />
OleDbParameter par = oledbCmd.Parameters.Add("UserName", OleDbType.VarWChar, 50);<br />
OleDbParameter parm = oledbCmd.Parameters.Add("password", OleDbType.VarWChar, 50);<br />
<br />
oledbCmd.Parameters["UserName"].Value = userName;<br />
oledbCmd.Parameters["password"].Value = password;<br />
<br />
oledbCmd.Connection = oleDBConnection;<br />
<br />
oleDBConnection.Open();<br />
<br />
OleDbDataReader dr ;<br />
dr = oledbCmd.ExecuteReader();<br />
It threw an exception when executing the last line. The exception states that Unspecified error.Oracle error occured,but error message could not retrieved from Oracle.Data Type is not supported.
|
|
|
|
|
That i know But i have to move to next page grid and retrieve the records and assign it to the data table.How should i?
my UpdateCustomerDetails method is as below
private void UpdateCustomersDetails()
{
Customers oCustomers = Customers.GetCurrentSingleton();
int iRowCount = oCustomers.CustomersList.Rows.Count;
for (int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++)
{
TextBox oTextBoxCustomerName = (TextBox)GridViewCustomers.Rows[iRowIndex].FindControl("TextBoxCustomerName");
oCustomers.CustomersList.Rows[iRowIndex]["cCustomerName"] = oTextBoxCustomerName.Text;
TextBox oTextBoxEmailID = (TextBox)GridViewCustomers.Rows[iRowIndex].FindControl("TextBoxEmailID");
oCustomers.CustomersList.Rows[iRowIndex]["cEmailID"] = oTextBoxEmailID.Text;
RadioButton oRadioButtonActive = (RadioButton)GridViewCustomers.Rows[iRowIndex].FindControl("RadioButtonActive");
RadioButton oRadioButtonInActive = (RadioButton)GridViewCustomers.Rows[iRowIndex].FindControl("RadioButtonInActive");
if (oRadioButtonActive.Checked == true)
{
oCustomers.CustomersList.Rows[iRowIndex]["bIsActive"] = true;
}
else if (oRadioButtonInActive.Checked == true)
{
oCustomers.CustomersList.Rows[iRowIndex]["bIsActive"] = false;
}
oCustomers.CustomersList.AcceptChanges();
}
-- modified at 7:40 Wednesday 31st October, 2007
kavitha
|
|
|
|
|
Hi All,
I want to read Excel file and show records into the Grid.
for that i have written vb.net code,this code is successfully running as follows:
DataGrid1.DataSource =
Excel.GetWorkSheetByName(Excel.ExcelWorkSheets.Item(0).TableName);
DataGrid1.DataBind();
while writting same code in c# as follows:
DataGrid1.DataSource =
Excel.GetWorkSheetByName(Excel.ExcelWorkSheets.Item[0].TableName);
DataGrid1.DataBind();
it gives an error message as follows:
Cannot apply indexing with [] to an expression of type 'WorkSheet'
Please Help.
Thanks in advance.
Tejesh Kamble.
|
|
|
|
|
hi
i m not getting what's the error ...
but u try like this
string strcon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\\jintal\\test\\test.xls; Extended Properties=Excel 8.0;";
OleDbConnection con = new OleDbConnection(strcon);
OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", connection);
DataSet myDataSet = new DataSet();
myCommand.Fill(myDataSet, "Sheet1$");
GridView1.DataSource = myDataSet.Tables["Sheet1$"].DefaultView;
GridView1.DataBind();
-- modified at 8:15 Wednesday 31st October, 2007
Jintal Patel
|
|
|
|
|
Thanks for ur reply.
I will try this.
Tejesh Kamble.
Software Engineer.
|
|
|
|
|
With the Index I m finding control so wen it reaches 5th record it searches for 6th then says out of range error because pagesize is 5
-- modified at 7:22 Wednesday 31st October, 2007
kavitha
|
|
|
|
|
Because here gridview's datasource contains only 5th records.
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
I m very clear i know that only 5 rows are ther in the grid .but i need all the records from the grid
kavitha
|
|
|
|