|
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
|
|
|
|
|
Thavika wrote: 5 rows are ther in the grid .but i need all the records from the grid
please don't forget to vote on the post that helped you.
|
|
|
|
|
Dear All,
I have a web application (ASP.NET / framework 2.0 / Windows Server 2003) on one machine, i.e. Web Server and corresponding database (SQL Server 2005) on second machine.
If I access the application from Web Server, it works fine, but when I access from a third client machine it gives following error
-------------------------------------------------------
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
-------------------------------------------------------
I think this has some thing to do with the permissions to access DB from client machines
my Web.config file has following things added
---------------------------------------------------------
<add name="ConnString" connectionString="workstation id=MY_WORKSTATION;packet size=4096; integrated security=SSPI;data source=MY_DB; persist security info=False;initial catalog=MY_CATALOG"/>
<system.web>
.....
<identity impersonate="true"/>
.....
</system.web>
---------------------------------------------------------
Moreover, the SQL Server is configured as per following link
"http://support.microsoft.com/kb/914277"
Please guide
Regards
Sachin
|
|
|
|
|
How to close a frame from either javascript or from code behind in a page? Suppose if in a page two frames are present and in one frame an aspx page is present...in onClick of a button in the aspx page the other frame should be closed and the aspx page should occupy the whole window ...is there any way to do this?
Koushik
|
|
|
|
|
I guess you can't close a frame. You can redirect to other page which don't have any frames.
|
|
|
|
|
code for get HTML Source from input URL
using System.Web.Caching;
using System.Net;
using System.IO;
string URL = TextBox1.Text;//INPUT URL
if (URL.Substring(0, 7) != "http://")//CHECK URL CONTAIN http://
{
URL = "http://"+TextBox1.Text;
}
string ConvertURL =(string)Cache.Get(URL);
if (ConvertURL == null)
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(new Uri(URL));
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader srdr = new StreamReader(res.GetResponseStream());
ConvertURL = srdr.ReadToEnd();
}
Response.Write(ConvertURL);
Raju.M
http://aspdotnetprogrammer.blogspot.com/
|
|
|
|
|
makhaai wrote: URL = "http://"+TextBox1.Text;
Why reading it from the text box again? Just do:
URL = "http://" + URL;
makhaai wrote: string ConvertURL =(string)Cache.Get(URL);
Why do you look in the cache for the source? Do you have any code elsewhere that stores anything in the cache?
You forgot to dispose the HttpWebResponse and the StreamReader.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
He was not asking a question, it seems like he is advertising this[^]
|
|
|
|
|
N a v a n e e t h wrote: He was not asking a question
Yeah, I didn't see any question, but he got an answer anyway.
N a v a n e e t h wrote: it seems like he is advertising this[^]
Seems you can take any crappy code and make a blog out of it...
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
makhaai wrote: please tell wat is the prob in my code?
I just did.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
i have a jaascript function. and a gridview , which contains a button.My problem is , how i should add the attributtes of that utton.i am doing it in the following manner.
on form load i am extracting the id of button (whichh is in gridview).
Button l = (Button)GridView1.FindControl("p");
l.Attributes.Add("onClick", "javascript:return abc();");
and in java script i am extracting the button id in the following manner.
function abc()
{
var a = document.getElementById("<%=GridView1.subassembly.ClientID%>");
alert(a);
}
after doing this , i am gettng an error, does not contain the definition for
subassembly.
Where is the problem lying?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: i am gettng an error, does not contain the definition for
subassembly.
From this you got the error. What's the problem now ?
Sonia Gupta wrote: var a = document.getElementById("<%=GridView1.subassembly.ClientID%>");
What is the use of getting Gridview's client id here ? Controls inside gridview will be having different id.
|
|
|
|