|
Thanks for the information.
I have following regular expression to check HH:MM:SS format of the text box.
^([0-1]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])$
I would like to give the flexibility to the user to enter the data in MM:SS format too. I was trying to modify the above regular expression to validate for the MM:SS format too. but didnt get the success.
can anyone please help me to build the regular expression to allow user to enter data in HH:MM:SS and MM:SS format too.
Thanks a lot.
|
|
|
|
|
Using Visual Studio 2005, when I edit a FormView template it is not presented in WYSIWYG mode, but is reformatted to about half-column size. Is there a trick to being able to edit a template as it will actually look? It looks correct when not in template editing mode.
|
|
|
|
|
VS 2005? Do you use C#, VB, ASP.NET, J#?
Could you be more specific?
|
|
|
|
|
Sorry: C#, VS 2005. When I go into template editing mode the templates are only about half the width of how they display when in non-edit mode. This makes it very hard to get the templates right. The same thing happens with VS 2008.
|
|
|
|
|
can't you use a property like ItemStyleWidth or ControlStyleWidth
|
|
|
|
|
The WIdth property of the FormView conrol is set to 100%. The templates (Edit, Insert, Item, etc) do not have a property sheet that I can find.
The templates display correctly when youo are not in template editing mode, but when you go into template editing mode the width of the Formview shrinks by about 50%, even though the Width property has not changed.
|
|
|
|
|
You might have code that looks like below?
<asp:FormView ID="FormView1" runat="server" DataKeyNames="au_id" DataSourceID="AuthorsSource">
<EditItemTemplate>
au_id: <asp:Label ID="au_idLabel1" runat="server" Text='<%# Eval("au_id") %>'/><br />
au_lname: <asp:TextBox ID="au_lnameTextBox" runat="server" Text='<%# Bind("au_lname") %>'/><br />
au_fname: <asp:TextBox ID="au_fnameTextBox" runat="server" Text='<%# Bind("au_fname") %>'/><br />
phone: <asp:TextBox ID="phoneTextBox" runat="server" Text='<%# Bind("phone") %>'/><br />
address: <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>'/><br />
city: <asp:TextBox ID="cityTextBox" runat="server" Text='<%# Bind("city") %>'/><br />
state: <asp:TextBox ID="stateTextBox" runat="server" Text='<%# Bind("state") %>'/><br />
zip: <asp:TextBox ID="zipTextBox" runat="server" Text='<%# Bind("zip") %>'/><br />
contract: <asp:CheckBox ID="contractCheckBox" runat="server" Checked='<%# Bind("contract") %>' /><br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update">
</asp:LinkButton>
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel">
</asp:LinkButton>
</EditItemTemplate>
<InsertItemTemplate>
au_id: <asp:TextBox ID="au_idTextBox" runat="server" Text='<%# Bind("au_id") %>'/><br />
au_lname: <asp:TextBox ID="au_lnameTextBox" runat="server" Text='<%# Bind("au_lname") %>'/><br />
au_fname: <asp:TextBox ID="au_fnameTextBox" runat="server" Text='<%# Bind("au_fname") %>'/><br />
phone: <asp:TextBox ID="phoneTextBox" runat="server" Text='<%# Bind("phone") %>'/><br />
address: <asp:TextBox ID="addressTextBox" runat="server" Text='<%# Bind("address") %>'/><br />
city: <asp:TextBox ID="cityTextBox" runat="server" Text='<%# Bind("city") %>'/><br />
state: <asp:TextBox ID="stateTextBox" runat="server" Text='<%# Bind("state") %>'/><br />
zip: <asp:TextBox ID="zipTextBox" runat="server" Text='<%# Bind("zip") %>'/><br />
contract: <asp:CheckBox ID="contractCheckBox" runat="server" Checked='<%# Bind("contract") %>' /><br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert">
</asp:LinkButton>
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel">
</asp:LinkButton>
</InsertItemTemplate>
<ItemTemplate>
au_id: <asp:Label ID="au_idLabel" runat="server" Text='<%# Eval("au_id") %>'/><br />
au_lname: <asp:Label ID="au_lnameLabel" runat="server" Text='<%# Bind("au_lname") %>'/><br />
au_fname: <asp:Label ID="au_fnameLabel" runat="server" Text='<%# Bind("au_fname") %>'/><br />
phone: <asp:Label ID="phoneLabel" runat="server" Text='<%# Bind("phone") %>'/><br />
address: <asp:Label ID="addressLabel" runat="server" Text='<%# Bind("address") %>'/><br />
city: <asp:Label ID="cityLabel" runat="server" Text='<%# Bind("city") %>'/><br />
state: <asp:Label ID="stateLabel" runat="server" Text='<%# Bind("state") %>'/><br />
zip: <asp:Label ID="zipLabel" runat="server" Text='<%# Bind("zip") %>'/><br />
contract: <asp:CheckBox ID="contractLabel" runat="server" Checked='<%# Bind("contract") %>'
Enabled="false" /><br />
</ItemTemplate>
</asp:FormView>
Each control, like Label or Checkbox have WIDTH properties. What changes for you if you set these ?
|
|
|
|
|
Yes the code is similar but the data is from a datasource and there is no Item template. Some of the controls have width properties set. The width properties do not seem to take effect in template editing mode but when not in template editing mode they are fine. The width of the item template is set to 100%, as is the width of the FormView. I have a table wrapping the contents of each template, and the table width is set to 100%. If I change the width of the table to something like 500px, the template editing mode expands to hold it. But I am trying not to use fixed width tables. When not in template editing mode all the widths are correctly displayed as 100%. They are only squeezed up in template editing mode and only if the widths are set to a percentage.
|
|
|
|
|
LOOKS like you have found a feature in .NET.
Is a GridView not a suitable component for this?
|
|
|
|
|
Oh, great
No, a gridview does not work for this...the formatting needs to be specific.
As a workaround I am setting all the table widths that enclose the templates to fixed widths, and will put them back to 100% before testing.
|
|
|
|
|
Hi All,
I am referring to a WSDL file in my web service application to access a web service. This wsdl has a complex type as follows:
<br />
<xsd:complexType name="PersonalData"><br />
<br />
<xsd:sequence><br />
<br />
<xsd:element name="dateofbirth" type="xsd:date" /><br />
<br />
</xsd:sequence><br />
<br />
</xsd:complexType><br />
<br />
The reference name is PersonalDataWS
I created an object of this web service and assigning some date to the dateofbirth element as follows
objPersonalDataWS.dateofbirth = Convert.ToDateTime("07/07/2008 14:10:00");
The problem is that when the dateofbirth is serialized as XML, only the date part is shown not the time part. Did anyone face this problem?
Is it because the WSDL defines xsd:date and not xsd:dateTime ?
I was reading about the date data type here http://www.w3schools.com/Schema/schema_dtypes_date.asp
but here I see data type xs:dateTime and not xsd:dateTime. Is there any difference?
any help will be greatly appriciated.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Try using the Ignore HTML tags in this message (good for code snippets) checkbox at the bottom to make your code more readable
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have a FormView control that will either enter or update one (and only) record in a datasource. I need to set the FormView mode based on whether there is a record in the datasource. I know how to switch modes by reading the datasource myself, but is there a way to get the FormView to do it automatically? Or is there a way to get FormView to allow an Empty Template to update the database? It doesn't seem the Empty template will bind to a datasoource the way the Edit template does.
|
|
|
|
|
how to save multiple values into single session using hash key concept
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Save Hashtable table with multiple values in single session variable.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Hi All,
I have a requirement in which i need to create a webservice with Basic Authentication without any SSL authentication.The domain is the client domain.
Any one having prior experience in creating such a webservice, please let me know.Im creating the webservice using Visual Studio 2003.
Also I need to consume this webservice, in a webapplication which is also created using VS2003.
It will be very helpful if you can help me in these two requirements.
|
|
|
|
|
Hi
I thought I had sorted this but I was wrong.
Basically Ive need to get a column value for the current row I am trying to update. The update is happening on a dropdownselectedchange click event. I thought that if I added in:
string strID = GridView1.DataKeys[x].Values[1].ToString();
it would work but it doesnt perform the update. I need to get another column id for the current row I am updating
any help on this would be great
thanks!
public void dd_OnSelectedIndexChanged(object sender, EventArgs e)
{
for (int x = 0; x < GridView1.Rows.Count; x++)
{
GridViewRow row = GridView1.Rows[x];
string strID = GridView1.DataKeys[x].Values[1].ToString();
SqlCommand cmd_update_activity_order = new SqlCommand("update_activity_order", con);
cmd_update_activity_order.CommandType = CommandType.StoredProcedure;
|
|
|
|
|
if you are trying to update only one row, Why there is a for loop inside SelectedIndexChanged event.
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
because another person on this forum told me to do it.
Do you know how I can get the current selected dropdownlist value and the another column value from the same row?
|
|
|
|
|
.netman wrote: current selected dropdownlist value
Because of you are going to do this in the SelectedIndexChange event,
You can you the 'sender', convert sender to dropdownlist and use selected value.
.netman wrote: another column value from the same row
How you are going to identify the current row(index of the row)?
If you know then, What is the problem of getting the value?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Sherin Iranimose wrote: You can you the 'sender', convert sender to dropdownlist and use selected value.
Can you explain what you mean by sender
Sherin Iranimose wrote: How you are going to identify the current row(index of the row)?
I'm not sure how to get the current row values e.g. another column
|
|
|
|
|
.netman wrote: Can you explain what you mean by sender
I was talking about the sender object in the OnSelectedIndexChanged Event handler
In the OnSelectedIndexChanged Event, you can use something like below...
DropDownList dropdown=(DropDownList)sender;
dropdown.SelectedValue <-- gives the selected value
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
.netman wrote: I'm not sure how to get the current row values e.g. another column
One way of doing this is to store the row number in the value field of the dropdown,
Eg:
in first row dropdown
Text value
1 1_1
2 2_1
3 3_1
4 4_1
1_1 will change to 1_2,2_1 to 2_2 and so on in the second dropdown
If you select 4 from 3rd row you will get 4_3 as value
So that you can retrieve the row index from this value field as follows
string val=drop.SelectedValue;
string rowNum=val.Substring(val.IndexOf("_")+1);
Hope this will help you
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Use DataKeyMember and DataKeyValue in your GridView.
In the OnSelectedIndexChanged(object sender, EventArgs e)
DropDownList ddl = (DropDownList)sender;
GridViewRow row = (GridViewRow)ddl.NamingContainer;
In that case you have the data of the GridViewRow that caused the Event.
GridView.SelectedIndex = row.RowIndex;
You know know the rownumber and with GridView.SelectedValue you know the DataKeyValue.
AT the end of the Eventhandler you state:
GridView.SelectedIndex = -1;
Good Luck
|
|
|
|
|
Good evening
i done the setting in web.config
<anonymousidentification enabled="true">
cookieTimeout="120000"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="Encryption">
and assign it in variable like
string temp=HttpContext.Current.Request.AnonymousID.ToString();
but AnonymousID contains null value.
what am i doing wrong don't know same code run on another system on same Application.
thanks
s am
Web Developer
|
|
|
|