|
May be this problem is from IIS
|
|
|
|
|
Have you created a virtual directory for your Web application under IIS?
The error message looks like VS is not able to find the web project under local host.
You can create a virtual directory in 2 ways -
[SIMPLE]
1. Copy your web proj to c:\Inetpub\wwwroot\ .
2. Open inet manager and locate the newly added folder under the default website.
3. Then "right click -> Properties", here you would see a "Create" button under "Application Settings", just click on it, Apply and close.
4. Refresh your Default website and you are done.
[Advanced]
1. Locate your web proj folder using Windows explorer.
2. Then "Right click -> Sharing and Security -> Web sharing -> Share this folder -> click OK on the new window -> Apply and close".
3. Now your folder would be listed in inet manager.
Proceed with step 2 of the simple process and you are done.
Doing either of these should solve your problem.
HTH!
|
|
|
|
|
Hi,
I wanted a RegEx to allow user to enter phone number in #-###-###-#### or ###-###-#### format only. (Eg: 1-888-456-5678 or 888-456-5678)
I have implemented RegEx[1] to allow user to enter Phone Number in #-###-###-#### format.
What changes do we need to make to the existing RegEx so that it allows user to enter Phone Number in the above 2 formats only?
Thanks in advance.
[1]
@"^\d{1}-\d{3}-\d{3}-\d{4}$"
Regards,
Vipul Mehta
Regards,
Vipul Mehta
|
|
|
|
|
You can just add an OR and put the 2nd type like so -
"^\d{1}-\d{3}-\d{3}-\d{4}$|^\d{3}-\d{3}-\d{4}$"
HTH!
|
|
|
|
|
Thanks Dinesh!! This works well
Regards,
Vipul Mehta
|
|
|
|
|
Your regex should be like this
^(\d{1}-){0,1}\d{3}-\d{3}-\d{4}$
to allow it to capture mentioned two pattern and not any others.
Please let me know if it helps you.
String input = "1-888-456-5678";
String sPattern = @"^(\d{1}-){0,1}\d{3}-\d{3}-\d{4}$";
Regex o = new Regex(sPattern);
Match m= o.Match(input);
if (m.Success)
{
MessageBox.Show("Match found.");
}
else
{
MessageBox.Show("No match");
}
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi,
I am trying to use the TableApapterManager.UpdateAll to insert values to master and child table. I had set the relation to cascade for update in the dataset relation and the HierarchicalUpdate to true. But still when I run TableApapterManager.UpdateAll(dataset), I get a foriegn key violation error. Following is the code I used:
m_adpMgr = new TableAdapterManager();
m_dsMembers = new ArchDemo.DAL.Datasets.dsMembers();
m_adpMgr.MemPhonesTableAdapter = new MemPhonesTableAdapter();
m_adpMgr.MembersTableAdapter = new MembersTableAdapter();
m_adpMgr.MembersTableAdapter.Fill(m_dsMembers.Members);
m_adpMgr.MemPhonesTableAdapter.Fill(m_dsMembers.MemPhones);
int ID;
DAL.Datasets.dsMembers.MembersRow rwMem = m_dsMembers.Members.NewMembersRow();
//Set values to parent table field
rwMem.u_name = mem.Name;
m_dsMembers.Members.AddMembersRow(rwMem);
DAL.Datasets.dsMembers.MemPhonesRow rwmemphn = null;
//Set values to child table field
rwmemphn = m_dsMembers.MemPhones.NewMemPhonesRow();
//Reference key value set here
rwmemphn.u_memberid = ID;
rwmemphn.u_phn = "test";
m_dsMembers.MemPhones.AddMemPhonesRow(rwmemphn);
m_adpMgr.UpdateAll(m_dsMembers);
return ID;
The error I get is "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MemPhones_Members". The conflict occurred in database "Family", table "dbo.Members", column 'i_memeberid'.
The statement has been terminated."
Can I get some advice on this.
Thanks and Regards,
Satheesh
|
|
|
|
|
The following is a piece of code that I am using to edit some HTML at runtime. My application reads a HTML template in, then replaces the tokens [%0], [%1], [%2], etc with parameter values.
This routine seemed to work fine, until I tried passing a HMTL link to the routine; it then bombs out with the following error message:
'=' is an unexpected token. The expected token is ';'. Line 14, position 91.
If I pass a regular string like "Hello World" to the routine, it works fine.
The string I am passing is:
"<a class='Link' href='http://localhost:2861/activateAccount.aspx?U=y@x.com&K=62cfaea3-ccd1-4831-9d29-985cbae49e2c'>http://localhost:2861/activateAccount.aspx?U=y@x.com&K=62cfaea3-ccd1-4831-9d29-985cbae49e2c</a>"
<br />
' This is actually a method from a class, the variable mXMLdoc is a member value in the class.<br />
<br />
Public Sub MergeData(ByVal ParamArray Args() As String)<br />
Dim i As Integer<br />
<br />
' Replace the [%0], [%1], [%2], etc tokens with parameter values<br />
For i = 0 To Args.GetLength(0) - 1<br />
mXmlDoc.InnerXml = mXmlDoc.InnerXml.Replace("[%" + CStr(i) + "]", Args(i))<br />
Next<br />
<br />
End Sub<br />
Looking forward to getting this resolved ... I'm out of ideas.
|
|
|
|
|
Hi,
You have one "&" in your string that you are passing. Replace '&' with & and I guess it will be solved.
Note the big ampersand here that you should replace.
href='http://localhost:2861/activateAccount.aspx?U=y@x.com<big>&</big>K=62cfaea3
Let me know if you get it going.
Thanks,
Arindam D Tewary
|
|
|
|
|
You were spot on !
I used HttpUtility.HtmlEncode to encode the string to a "safe HTML" format and now things are working fine.
Sometime when you stare a problem too long, you don't see it.
Thanks again,
David
|
|
|
|
|
Glad to help you out
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi folks!
Hopefully I have chosen the right message board. We are developing an application using Silverlight 3, RIA services and Entity Framework (C#/.Net 3.5). In the web project we have a aspx-file hat handles file downloads that are initiated in the Silverlight client, this file is called downloadfile.aspx with code behind file downloadfile.aspx.cs. Everything works fine, we can build and start the application.
But when we build the web deployment project, we get an error that says, that a type cannot be found and we should add a reference to a certain assembly. According to VS2008 The error is located in the downloadfile.aspx.cs file of the web deployment project. But how come? Of course the web deployment project does not have any files nor references. Why is running in debug mode? So it should be correct in terms of the build process. What does the deployment project do?
Does anyone have any ideas?
Thanks,
Florian
|
|
|
|
|
Finally I found the problem: In the web project the output path was not correctly set.
Second things is, that the web deployment project does not work with RIA Services!
regards,
Florian
|
|
|
|
|
Hey guys,
The user is going to supply a userid, username and password.
while the user writes the userid I want to check in the database
if it exist and if it does, i will fill the username relating to that userid.
I would like Ajax to help me with this, is there anyone who knows how
this can be done? please help me
Thanks guys.
|
|
|
|
|
This is really a very simple task, what part are you having difficulties with?
Show what you have so far or at least outline your ideas. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks,
I have three input boxs, userid, username and password, and a submit button.
The user will enter userid in the input box, then I want to invoke the onblur="check()"
event to check the userid entered with a value in the database and if it exist I will
fill the username.
My problem is the whole layout of Ajax, how I'm supposed to implement it, creating a '.js' file that will in the background
call default.aspx to connect to the database. default.aspx will ofcourse use default.aspx.cs
to connect to the database.
Does this help you see what I am trying to do?
|
|
|
|
|
You need to start here[^] I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You could use ASP.NET AJAX for this, the easy way would be to use the UpdatePanel, the not so easy way would be to call a WebService or PageMethod to get the data and the use JavaScript and the DOM to show the new data to the user, as I said the WebService way is not as easy but is much faster and will give you better performance than the UpdatePanel, check this link[^] for samples and tutorials on WebServices, here’s[^] the ASP.NET AJAX site.
|
|
|
|
|
Hi All,
I'm creating a web application in ASP.NET and c#. What I'm trying to do is create a vertical menu similar to the blue one in this link:
http://www.alistapart.com/articles/taminglists/
I've created these menus in the past but in just a plain HTML page not ASP.NET. When I try to apply the same format to the unorder list the look isn't the same so I was trying to create it using LinkButtons like so:
<span class="subMenuDiv">
<asp:LinkButton ID="link1" runat="server" CssClass="subMenu" Text="Case Info"></asp:LinkButton>
<asp:LinkButton ID="link2" runat="server" CssClass="subMenu" Text="Reportable Info"></asp:LinkButton>
</span>
The CSS looks like this:
.subMenuDiv {
float: right;
width: 120px;
padding: 0 0 0 0;
border: none;
margin: 0;}
.subMenu {
width: 100%;
margin: 0;
padding: 4px 10px 4px 10px;
text-decoration: none;
background-color: #CCCC99;
border: solid 1px black;
color: #666633;
text-align: left;}
The problem I'm having is the border of the subMenu is showing up twice, i'm not sure why but I know the padding is linked to it.
How do I get it so the border only shows on the outer edge of the linkButtons (subMenu items) and so only one border is shown?
Any help would be great.
Thanks
|
|
|
|
|
Do not repost the same question to multiple forums. You have asked this yesterday in the .net framework forum. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sorry for the report, I forgot about the ASP.NET message board and posted in the .NET instead.
I'd like to remove it from the .NET message board if possible.
Thanks
|
|
|
|
|
http://www.codeproject.com/Messages/1278599/How-to-get-an-answer-to-your-question.aspx[^]
6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
haved looking ,thank you very manch.
|
|
|
|
|
How to store DateTime in database am using following code.
-- Modified Thursday, March 18, 2010 9:01 AM
|
|
|
|
|
One, please follow the rules of these forums and format the code you post using the pre tags.
You are not passing a date to the insertdate method in your button handler I know the language. I've read a book. - _Madmatt
|
|
|
|