|
Can you rectify the error in below
<asp:textbox id="txttime" runat="server" text=""><![CDATA[<%DateTime.Now.ToShortTimeString()%>]]>"></asp:textbox>
thanks
G. Satish
|
|
|
|
|
Please read http://www.codeproject.com/KB/tips/HowToUseGoogle.aspx[^]. Your problem is very straightforward, and I found the exact right answer with the first search I tried.
<asp:TextBox ID="BookingDate" runat="server" Text='<% #DateTime.Now.ToShortTimeString() %>'></asp:TextBox>
Note the #.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Try making " to ' for the text property.
|
|
|
|
|
Hi,
I am working in a web based solution where i have to implement a searching functionality from Active Directory and there are over 1,50,000, records . so what would be the best technique to search from AD. For searching from AD if user always hit AD I thing it would going to be very slow !!! please give some idea !!
Thanks in advance !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi
In my database I have a Table for Assignments and a master table for AssignmentType.
I use a GridView to display all the assignments handed in by a student. When a row in the GridView is selected the details of the assignment are displayed in a DetailsView to allow for editing, deletes, inserts. However in the AssignmentType field it shows the AssignmentType index (Foreign key). This is not very user-friendly for the user. Ideally I would like to have a DropDownList in that field so that the user can select the actual AssignmentType and not have to deal with the index itself.
Can this be done in the DetailsView? How would be the best way to achieve this?
Regards.
Kobus
|
|
|
|
|
If I got you, you have 2 different problems
1- you need to display the AssignmentType in the GridView by name rather than index
And I think this can be handled form Database as follows
Create a view like belw
SELECT Assignments .*, AssignmentType.assignmentTypeName
FROM Assignments INNER JOIN AssignmentType ON Assignments.assignmentTypeIndex = AssignmentType.assignmentTypeIndex;
Then bind the GridView to the above view rather than the Assignment Table
2- You need to allow the user to edit the Assignment Type also by name
And I think you have the answer
kbalias wrote: Ideally I would like to have a DropDownList in that field
Actually all your need is a DropDownList
M. Gouda
foreach(Minute m in MyLife)
{
myExperience++;
}
modified on Monday, March 17, 2008 4:58 AM
|
|
|
|
|
Thanks.
I have managed to add a DropDownList to the DetailsView. When I want to Edit the DetailsView, the DropDownList populates correctly with the list of Types.
However when I try to Update, the newly selected value in the DropDownList is not used to update the database. In other words the value of the Foreign key column is not being updated in the database.
I use the following code:
<asp:TemplateField HeaderText="AssignmentType"><br />
<ItemTemplate><br />
<asp:Label ID="lblType" runat="server" Text='<%# Eval("AssignmentType")%>'></asp:Label><br />
</ItemTemplate><br />
<EditItemTemplate><br />
<asp:DropDownList ID="DropDownList_Type" runat="server" DataSourceID="SqlDataSource_Types" <br />
DataTextField="AssignmentType" DataValueField="TypeIndex" AutoPostBack="true" /> <br />
</EditItemTemplate><br />
</asp:TemplateField>
The SqlDataSource is as follows:
<asp:SqlDataSource ID="SqlDataSource_Types" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"<br />
SelectCommand="own_AssignmentType_Select" SelectCommandType="StoredProcedure"><br />
</asp:SqlDataSource>
I am obviously missing something, but I do not know what or where.
Thanks.
Kobus
|
|
|
|
|
I think the problem resign in the update statement ... can you show it
however, it should look like this
"Update Assignments SET AssignmetType=" + DropDownList_Type.DataValueField.ToString() + " WHERE id=" + selectdAssignment;
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Hi All,
I have an aspx onto which I have dragged my UserControl (ascx). What I want to be able to do at runtime is retrieve the ascx filename (test.ascx). I have had no luck in finding a property with this information.
Can anyone point me in the right direction?
Thanks,
Steele.
|
|
|
|
|
I don't think you can. If it's not the name of you class, I don't see how it's bound to the class, and therefore findable in code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Add a hidden field with the file name to the ascx.
|
|
|
|
|
i have a form and for a few of the text boxes i have validators on them both required and compare validators and whenever i click my save buttons it triggers the validators correctly and they show hat required field is missing and so on, however if i for example i select a drop down list or anything that causes a post back to the server to do some function probly to filter or set some values. the validators stop showing up on the screen they still work in the sense that when i click save t still does do anything because all the required fields are not filled out but the annoying thing is that at this point it no longer displays the validation summary or error message or anything indicating where on the page is not valid, it works fine once i don't do anything to the page that triggers a postback but once something like that happens it doesn't work until i close the window completely and start over.
has anyone ever encountered this or know of a work around?
|
|
|
|
|
When i do searchs on emial gridview, the results i get are on how to email from a gridview. i want to email the gridview itself. Put it in the body of an html email.
Thanks for the help.
|
|
|
|
|
I can't believe question even has to be asked
GridView is simply rendered as a HTML table. If you want to email it, create a table in the HTML body of the email. Of course, if you are looking for full functionality of the GridView in an email message, then you're out of luck.
only two letters away from being an asset
|
|
|
|
|
you say the gridview is rendered as a table, i have the screen with the gridview on it how do i get that gridview into the email body? That is the step i am unsure of.
thanks,
|
|
|
|
|
Create a damn HTML table, as I have already said!
What are you asking? How to create an html table? How to put it in the body of an email? Or is it that you just want someone to do the work for you?
only two letters away from being an asset
|
|
|
|
|
hello sir,
i want to make a program that can detect messages sending from one mobile to other.
actualy my girl freind is suspected. i want to aware who sends messages to her and whose she sends messages,
can any one help me.
thank in adv.
yogesh
|
|
|
|
|
yogesh_softworld123 wrote: actualy my girl freind is suspected. i want to aware who sends messages to her and whose she sends messages
You want us to help you spy on your girlfriend? You're kidding, right?
Wouldn't it be easier to like, you know, talk to her about it?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
boddy u are really genius
I Love SQL
|
|
|
|
|
I don't know what's going on. The freaks seem to have taken over the boards today.
First it was the ignorant, people who don't know how to use a search engine. Then you've got paranoid types, like this guy who wants help cyberstalking someone (which I'm pretty sure is illegal).
Hopefully normal service will be resumed tomorrow.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
pmarfleet wrote: The freaks seem to have taken over the boards today.
Hmmmm, and not quite a full moon yet, either...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I blame water fluoridation. That guy from Dr Strangelove was right all along...
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
yogesh_softworld123 wrote: can any one help me.
My advice is to give up the relationship if you can't trust her. She will certainly dump you when she finds out.
only two letters away from being an asset
|
|
|
|
|
You are a retard.
1 - this has nothing to do with ASP.NET
2 - no, you can't, not unless you're the CIA
3 - if you don't trust her, what's the point of spying on her ? Just leave her.
Steal her phone, that's probably the best bet. Just be sure she doesn't catch you, she might burn your trailer down.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|