|
Is it possible to write a code in asp.net 2.0 to use calender control like dtpicker in visual basic
Malay Mukherjee
|
|
|
|
|
Malay Mukherjee wrote: use calender control like dtpicker in visual basic
How do you mean?
only two letters away from being an asset
|
|
|
|
|
I am preparing a site for a school, where student can see answers posted by teacher(s). Page looks (only for this page) will be very much similar to code project, where we can have chain of answers.....
Can i use repeater control for this? I am not sure how i will bind the replies with question if i used repeater control....
But obvious Questions will be display in ItemTemplate...
Any one with any suggestion.....
Thanks,
Amit
|
|
|
|
|
Hi
i have a problem.In one of my application i am maintaining all control
values on a page in session using AJAX.i have done it.My page contain two dropdownlist.Data value field of items in dropdownlist is nothing but the id
of items,i am retriving an selected item name from database using its id from
database.once i got name the problem is that how can i give selected item of ddlist
is the item name. i am tried
ddlist.SelectedValue=session("name")\\it gives null
ddlist.SelectedItem.Text=session("name")\\\it gives object reference not set to instance of object error.
How can i do this.Please guide me.
Thanks.
df
|
|
|
|
|
rahul.net11 wrote: object reference not set to instance of object error.
To resolve this problem, register the Adodb.dll file in the global assembly cache (GAC). On a computer where only the .NET Framework is installed, the file Gacutil.exe does not exist.. Either obtain the gacutil file by installing Microsoft .NET Framework SDK, or create a Visual Studio.NET setup project that uses the installer to install the correct components.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Hi Satips
Is there any other solution another that.I think this is not due to that.
Thanks.
Rahul
df
|
|
|
|
|
rahul.net11 wrote: ddlist.SelectedValue=session("name")\\it gives null
ddlist.SelectedItem.Text=session("name")\\\it gives object reference not set to instance of object error.
Both are read-only properties. How are you able to assign the values???
|
|
|
|
|
if the item is already existing then check whether whether u are calling these lines
ddlist.SelectedValue=session("name")\\it gives null
ddlist.SelectedItem.Text=session("name")\\\it gives object reference not set to instance of object error.
before the dropdownlist is populated or after!!!
if you are running it before the population then it cannot find the dropdownlist and it will give a null reference exception!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
What is wrong with this....I don't know this morning what is happening with me..Is it because of 07/07/07....
My dtrCat (data reader) is getting -1 record affected.........Conenction is fine.............Pl help me from 07/07/07 devil.....
---------------------
SqlConnection conDotNet;
SqlCommand cmd;
SqlDataReader dtrCat;
conDotNet=new SqlConnection();
conDotNet.ConnectionString="Server=SBServer;User=sa;Password=;database=SB;";
cmd=new SqlCommand();
cmd.CommandText="Select * from dbo.TB_QueryMaster";
cmd.CommandType=CommandType.Text;
cmd.Connection=conDotNet;
cmd.Connection.Open();
dtrCat=cmd.ExecuteReader(CommandBehavior.CloseConnection);
catlist.DataSource = dtrCat;
catlist.DataBind();
cmd.Dispose();
conDotNet.Dispose();
Amit
|
|
|
|
|
Amit Kumar G wrote: Is it because of 07/07/07
LOL.
Please ask it in the Correct Forum.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
This is ASP.Net forum and my query is related to the same.....
Regards
Amit
|
|
|
|
|
What problem you are having ?
it is getting one record affected means?
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
My query only returns -1 which means no record affected.....I checked the database table and data is there, connection is fine ..........
Satips...Please help me, i have seen lot of replies from your side....
Thanks!!
Amit
|
|
|
|
|
Amit Kumar G wrote: My query only returns -1 which means no record affected
True.
Amit Kumar G wrote: I checked the database table and data is there, connection is fine
Ok.
Then what problem?
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Satips wrote: Ok.
Then what problem?
I believe that is what his original question was
Thanks for your valuable contribution in asking him the same question he has asked you.
only two letters away from being an asset
|
|
|
|
|
Amit Kumar G wrote: My dtrCat (data reader) is getting -1 record affected
Yes, of course. A select query does not change any data.
From MSDN library:
"SqlDataReader.RecordsAffected Property
Gets the number of rows changed, inserted, or deleted by execution of the Transact-SQL statement."
---
single minded; short sighted; long gone;
|
|
|
|
|
I always thought it should return 0 rather than -1.
|
|
|
|
|
It's all in the documentation, plain to read:
"Property Value
The number of rows changed, inserted, or deleted; 0 if no rows were affected or the statement failed; and -1 for SELECT statements."
---
single minded; short sighted; long gone;
|
|
|
|
|
Well I know that is what it does, but logically it seems 0 would be more appropriate. I'm questioning someones design decision not you answer
|
|
|
|
|
Well, a zero would mean that there were zero records uppdated. As there shouldn't be any updated records, there shouldn't be any count of them either, so I can see how a value representing a non-count would be more appropriate than a count of zero.
---
single minded; short sighted; long gone;
|
|
|
|
|
That makes sense I suppose.
|
|
|
|
|
What is wrong in this ....In IE i can not see repeater control...
<%@ Page Language="C#" MasterPageFile="~/WebForms/MasterPage.master" AutoEventWireup="true" CodeFile="Query.aspx.cs" Inherits="WebForms_Login_Query" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
<asp:Repeater ID="catlist" runat="server">
<HeaderTemplate>
<tr>
<td>
Amit Header
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
Amit Item
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
<tr>
<td>
Amit Footer
</td>
</tr>
</FooterTemplate>
</asp:Repeater>
</asp:Content>
Amit
|
|
|
|
|
Are you actually binding data to it?
only two letters away from being an asset
|
|
|
|
|
|
If you are not binding anything to it then what's the point in using it?? Just create a HTML table.
only two letters away from being an asset
|
|
|
|