|
You can ask whatever you like, but there's a basic level of question where it would be quicker for you to use google.
- What is winforms and webforms?
winforms is a windows app, webforms is a web app ( ASP.NET )
- What is assembly and how we can convert private assembly to shared assembly?
An assembly is a dll. If an assembly is private, then nothing else can use it. You can change it's level of exposure by changing the code.
- What is run time component?
I guess you mean something that's created at run time ( when the code is running ), instead of in the designer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi Christian,
Thanks once again for ur response. i will definitely google in future.
thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
thanks Deepak for sending the link. i saw this site, really good!
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
What is the fastest way to check what selection a user made in a drop down list? I have a drop down list that i coded the items in the page load, and now you are able to loop through the list. how do i fix this that it just list the items and scrolls to the bottom of the list and stops.
Is it possible to change the table that a gridview uses?
-- modified at 18:48 Monday 29th January, 2007
|
|
|
|
|
I have a aspx web site where I upload photos to a folder.
I want a webpage that displays the photos in the folder. How can I code this page to show the photos in the folder??
~Peterson
|
|
|
|
|
Use image control in the web page i think
|
|
|
|
|
Could any of you explain when i should exactly use typed Dataset. I know how to use it, but i have not implemented in my project. When i should go for typed dataset.Thanks for your precious time.
|
|
|
|
|
DataColumns for our DataTables to specify what type of data could be stored in each column. This enforces runtime type-safety, but on most occasions we would like to know that our DataSets are type-safe when we write the code. Typed DataSets generate classes that expose each object in a DataSet in a type-safe manner.
Using a DataSet
// Create a DataAdapter for each of the tables we're filling
SqlDataAdapter daCustomers =
new SqlDataAdapter("SELECT * FROM CUSTOMER;", conn);
// Create the Invoice DataAdapter
SqlDataAdapter daInvoices =
new SqlDataAdapter("SELECT * FROM INVOICE", conn);
// Create your blank DataSet
DataSet dataSet = new DataSet();
// Fill the DataSet with each DataAdapter
daCustomers.Fill(dataSet, "Customers");
daInvoices.Fill(dataSet, "Invoices");
// Show the customer name
Console.WriteLine(dataSet.Tables["Customers"].
Rows[0]["FirstName"].ToString());
Console.WriteLine(dataSet.Tables["Customers"].
Rows[0]["LastName"].ToString());
Console.WriteLine(dataSet.Tables["Customers"].
Rows[0]["HomePhone"].ToString());
// Change an invoice number with a string
// this shouldn't work because InvoiceNumber
// expects an integer
dataSet.Tables["Invoices"].
Rows[0]["InvoiceNumber"] = "15234";
We need to use indexers with the DataSet to get each piece of the hierarchy until we finally get down to the row level. At any point you can misspell any name and get an error when this code is executed. In addition, the last line of the example shows us attempting to set the invoice number using a string. The DataSet knows that this column can only hold integers so we will get a runtime error enforcing that rule.
Using a Typed DataSet
There are a few things to notice in this example. First, we create our Typed DataSet much like we created a DataSet in the first example—the difference is that the schema already exists in our Typed DataSet. Second, even though this is a Typed DataSet, the CustomerTDS class directly derives from the DataSet class. Therefore, when we call the DataAdapters to fill our DataSet, it will accept our Typed DataSet. In fact, the Typed DataSet is a DataSet . . . a specialized DataSet. Next, you should notice that the syntax to get at tables and fields is much more straightforward with Typed DataSets. Each DataTable is now referenced with a property of CustomerTDS. Likewise, each field is a property of a row. Not only is this syntax more straightforward, but you will get compiler errors if you misspell any of the elements. Lastly, when we try to set our invoice number with a string we also get a compiler error, because our generated class knows that invoice numbers are integers.
In addition to normal columns, you can set up expression columns in our Typed DataSets to make sure that expressions can be returned in a type-safe manner. For instance, in the above example, we can retrieve the FullName property from Customer. FullName is just an expression field that puts our customer's first and last names together in a convenient form. Because it is part of the Typed DataSet, this expression is returned as a string.
// Create a DataAdapter for each of the tables we're filling
SqlDataAdapter daCustomers =
new SqlDataAdapter("SELECT * FROM CUSTOMER;", conn);
// Create the invoice DataAdapter
SqlDataAdapter daInvoices =
new SqlDataAdapter("SELECT * FROM INVOICE", conn);
// Create your blank DataSet
CustomerTDS dataSet = new CustomerTDS();
// Fill the DataSet with each DataAdapter
daCustomers.Fill(dataSet, "Customers");
daInvoices.Fill(dataSet, "Invoices");
// Show the customer name
Console.WriteLine(dataSet.Customer[0].FirstName);
Console.WriteLine(dataSet.Customer[0].LastName);
Console.WriteLine(dataSet.Customer[0].HomePhone);
Console.WriteLine(DataSet.Customer[0].FullName);
// This will not compile because InvoiceNumber expects
// an integer
dataSet.Invoice[0].InvoiceNumber = "12345";
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
I've got a fairly big set of questions that I want users of my website to answer, so I obviously turned to the wizard control. Two of the questions involve dates, so I'm using a pop-up calendar - with javascript to try and populate the appropriate textbox with the value selected in the calendar control. And that's where my difficulties starts.... I'm having a problem finding the correct way to reference the textbox when it is part of a wizard step.
Basically, I use javascript to open the calendar pop-up and pass a querystring value at the same time, which includes the name of the form and textbox. For example, the querystring value could be Form1.txtBirthdate . The calendar control then has a "OnSelectionChanged" event which uses the querystring value to populate the textbox and close the popup. This whole procedure works perfectly - as long as the textbox is not part of a wizard control. On the other hand, if the textbox is contained in one of the wizard steps, everything falls apart - the popup does not close, and the value is not "placed" in the textbox.
It seems obvious that my querystring value is not taking account of the complexity of finding a textbox control within a wizard step. Any ideas on how to fix this? ANY advice would be appreciated!
|
|
|
|
|
I'm a app developer moving into the world of web development so forgive me if this is a stupid question.
Is it possible to access a control contained inside an ASP Wizard control in Java Script? I'd rather handle something simple like this on the client side rather than waste server time activating a text box
For example: I have a combo box and if the user selects 'other', I want a text box to be enabled.
Here's a sample of my script code
if(document.getElementById("ddSampleLookup").outerHTML == "Other")
{blah blah blah}
When my onclose handler for the drop down hits, I get the following error:
Microsoft JScript runtime error: Object required
I've tried with quotes, without quotes and even with single quotes but still no love.
I should mention that when I try without quotes I get the error: "Microsoft JScript runtime error: 'txtNarcoticName' is undefined" instead.
Thanks in advance!
Edit: I should not that I put this here rather than the Web Development forum because I wasn't sure if this was a Java Script issue or an issue with the wizard control.
-- modified at 14:22 Monday 29th January, 2007
|
|
|
|
|
The issue is that your client controls all have names created by ASP.NET. So, you need to insert this script with RegisterClientScriptBlock, and do something like:
"if(document.getElementById("" + ddSampleLookup.ClientID + "").outerHTML == "Other")" ( not corrected for quotes
The other option is this:
if(document.getElementById("<%ddSampleLookup.ClientID%>").outerHTML == "Other")
which can go in your aspx, the <% %> block is server side code.
You should also always check that document.getElementById has returned you something, or you will risk this sort of error.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi all!!
I am on a project that need show the fields that have a DB, but in a APP of Desktop I haven't problem to do this.
Now in ASP I don't know do that. In a simple way to show what I do, I drop yours this code, that try to fill a dataset to show then in a crystalR.
DataSet ds = new DataSet();
sqlConn = ConnectionPool.GetConnection();
SqlTransaction sqlTrans = sqlConn.BeginTransaction();
ds = SqlHelper.ExecuteDataset(CommandType.StoredProcedu
re,"DP_GetAllEmp",sqlTrans);
sqlTrans.Commit();
sqlTrans = null;
ConnectionPool.ReleaseConnection(sqlConn);
CrystalReport1 cr1 = new CrystalReport1();
cr1.SetDataSource(ds);
CrystalReportViewer1.ReportSource = cr1; //this is the problem
//in this place exploit, and said me that the report data source isn't valid
if everybody have any idea, please say me
|
|
|
|
|
I guess ds is returning null. Please check it out.
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
Hi all,
I am designing an employee search webform which has following search criteria:
1. Name (Dropdownlist, because I have names of all employees)
2. Grade (Dropdownlist)
3. Department(Dropdownlist)
4. Designation(Dropdownlist)
The problem is that I have to show the results for only those criteria that are selected. It is simple if I use open queries and use querybuilder, but I am restricted to use stored procedures.
Can anyone suggest me some strategy to go about it and any queries such that the values that are not selected are not considered.
Thanks in advance
|
|
|
|
|
A trick that you can use to omit a value, is to compare it with itself:
where SomeField = isnull(@SomeValue, SomeField)
If you send in a null value, the value in the field will instead be compared to itself, and therefore always match.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi all,
Any help on creating a dynamic treeview in windows form where the number of children nodes is unknown at design time. I want the user to be able to create new parent and child notes.
thanks
|
|
|
|
|
Use Nodes.Add to add nodes. You can do it something like this:
TreeNode parentNode = new TreeNode("My node");
treeView1.Nodes.Add(parentNode);
TreeNode childNode = new TreeNode("childNode");
parentNode.Nodes.Add(childNode);
This code will add a top level node (My node), and then add a child node to this (childNode).
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
When a row is edited I would like to get the value of one of the data keys.
The datakey being the ID column that is not displayed on the table but is part of the SQL select statment.
So i can get the actual tables ID column value relating the to GridView row baing changed... so I can write my own update stored procedure.
-- modified at 10:28 Monday 29th January, 2007
|
|
|
|
|
Dear All,
i am bit new to the dotnet world. i am making web application using asp.net ,C# (Visual studio 2005).
i am using two dropdownlistbox which i defined as
FIRST AS
<asp:dropdownlist id="DropDownListbranch" runat="server" datasourceid="SqlDataSourcebranch"
="" datatextfield="display" datavaluefield="branchcode" style="left: 341px; position: absolute;
top: 72px" width="134px" <b="">AutoPostBack="True" AppendDataBoundItems="True" OnSelectedIndexChanged="DropDownListbranch_SelectedIndexChanged">
<asp:listitem> Select One
SECOND AS
<asp:dropdownlist id="DropDownListname" runat="server" datasourceid="SqlDataSourceid"
="" datatextfield="display" datavaluefield="agentid" style="left: 342px; position: absolute;
top: 99px" width="131px" <b="">AppendDataBoundItems="True" AutoPostBack="True" OnSelectedIndexChanged="DropDownListid_SelectedIndexChanged" TabIndex="1">
<asp:listitem>Select One
<asp:listitem>New
BOTH I FILLED AS
FIRST AS
<asp:sqldatasource id="SqlDataSourceid" runat="server" connectionstring="<%$ ConnectionStrings:HFSERVICESConnectionString %>"
="" selectcommand="Sp_name" selectcommandtype="StoredProcedure">
<selectparameters>
<asp:sessionparameter name="type" sessionfield="myna" type="String">
<asp:controlparameter controlid="DropDownListbranch" name="branch" propertyname="SelectedValue"
="" type="String">
SECOND AS
<asp:dropdownlist id="DropDownListname" runat="server" datasourceid="SqlDataSourceid"
="" datatextfield="display" datavaluefield="agentid" style="left: 342px; position: absolute;
top: 99px" width="131px" appenddatabounditems="True" autopostback="True" onselectedindexchanged="DropDownListid_SelectedIndexChanged" tabindex="1">
<asp:listitem>Select One
<asp:listitem>New
Actually i want along with data in second dropdownlist box there alway be option of Select one and new.where i am going wrong ? please guide me.
thanks
regards
imran khan
|
|
|
|
|
HI Imran
i think you want "Select One" item at 0th index ?
Simply add this in page load
DropDownList1.Items[0].Text = "Select One";
There are many methods using which you can add this most simple
I think it solve your problem
|
|
|
|
|
Here is another way
DropDownList1.Items.Insert(0, "Select many");
instead of string as second parameter you have one more overloaded method see it
Enjoy coding
|
|
|
|
|
I want to insert some string value at location where cursor is pointing in textbox.
Suppose a Textbox have contents like ABCDE and cursor is blinking after 'C',
- ABC|DE
and I want to insert a string str = "XYZ" at this position on some button click.
For eg. by using Textbox1.Text.Insert () or some other method.
and here I need current cursor position in textbox.
I am not entering text by keybord.I want it to be inserted on button click.
Got it ?
-- modified at 1:25 Tuesday 30th January, 2007
Abhijeet Beedkar.
India
|
|
|
|
|
Hi Abhijeet
Sorry i am not getting you question ? Please elaborate it
|
|
|
|
|
i am not sure what you are trying to say but
you can get cursor in the textbox while page loads using tanindex property of the textbox make it to -1
TabIndex=-1
Enjoy Coding
|
|
|
|