|
Hi all,
I want to send a meeting request in outlook with an attachment.How can i send it from code.Also if possible i want to disable the deny button in the request. How can i achieve it???
Thanks in adv
|
|
|
|
|
hi all
give me a code please
--if password is entered incorrectly 3 times then lock the username and display a warnong message "account has been locked,please contact the system administrator."
give me a code please.
Gayatri
Gayatri
|
|
|
|
|
if(password is right)
---your code comes here---
if(password is wrong)
----increment a variable like 'attempts' by 1 ---initialize to zero at the begining itself
---if(attempts>3)
account locked
wrong username and pwd entered.
Gautham
|
|
|
|
|
Hello,
I created 2 GridViews, A and B. I created 2 datasets from Asp.Net 2.0 profile data.
Each GridView has a Bound Field and a Button Field.
When a button on GridView A is clicked the following should happen:
1. Copy the Row to GridView B
2. Delete the Row from GridView A
Finally, I have a button which would get the data from GridView A and GridView B.
What is the best way to create this?
And is GridView the best way to do this?
Thanks,
Miguel
|
|
|
|
|
I am not sure if its possible without javascript to handle at client side.
GrdiView is a server control it means you have to play with database. Best way to me is create tables in databae and then play with data. and delete or copy in between tables or use XML files whatever appeals you.
Also you can use Ajax updatepanel so it will look like that its not communicating with server or refresing pages at client side.
Personally I'll not suggest you to use ajax while doing these operartions untill unless you are happy with the operations.
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
Hi!
We are about to start a project that includes building a rather advanced ASP.NET user-interface. The somewhat unusual thing is that all components will be web parts, and we will host the app in WSS 3.0.
To get a head-start, we will use one of the commercial ASP.NET component libraries that are out there. We haven't nailed down all the detailed requirements, but we our main needs is powerful tree and grid-controls. Ajax support is a must.
Just browsing through the latest MSDN Magazine shows me several options:
* NetAdvantage by Infragistics
* SyncFusion
* Web.UI by ComponentArt
* Studio Enterprise by ComponentOne
* PowerWeb by Dart
* RAD Controls by Telerik
and I'm sure there are more. It will be time-consuming to assess all the options, so I'm asking you for help here. If you have had any experience working with any of the above or other ASP.NET UI component suites, please give me your feedback.
Some of the aspects I'm looking for are:
* Feature richness
* Feasibility for use in WSS web-parts
* Ease-of-use for the developer
* Documentation
* Access to source code
* Support, bugfixes
* Community support
* Intellectual property rights management (e.g. who owns the code if modified, etc)
Thanks a lot!
/Fredrik
|
|
|
|
|
I have created a user control for a common section of my project. The control contains 3 drop down lists. Each drop down list triggers the visibility and content of the next. This is quite a common technique used around the web and it works great for this issue of product selection.
Originally, when the functionality was built seperately into the pages, the final drop down list was used to confirm the selection and perform an action. On one page this was to Response.Redirect to another page, passing the selection in a query string. On another page this alters the visibility of the containing panel and shows the next step in another panel. Therfore the function performed when the final drop down box is selected can differ between pages.
My issue is how do I create the control in such a way that when the final drop down is selected the control triggers some sort of event that I can use in the page. I would then obviously use the result from the control on different ways from within the page.
Hopefully I have made it clear what I seek to achieve. Thanks in advance
|
|
|
|
|
The answer is in your question.
The solution to creating some kind of event is simply to create an event.
public event EventHandler Complete;
Now you have an event that you can use just like any control uses events.
The page can register for the event by adding a handler:
InstanceOfUserControl.Complete += new EventHandler(InstanceOfUserControl_Complete);
The Event handler looks like any standard event handler:
Public void InstanceOfUserControl_Complete(object sender, EventArgs e) {<br />
}
Your user control just calls the event handler when it wants to alert the page of the event:
Complete(this, EventArgs.Empty);
---
single minded; short sighted; long gone;
|
|
|
|
|
Hey thanks for the response. Once i got started it turned out to be even easier than this. I simply added an event which passed all three drop down lists.
Public Event SelectionComplete(ByVal Type As DropDownList, ByVal Use As DropDownList, ByVal Purpose As DropDownList)
Raised the event where it was needed in the code
RaiseEvent SelectionComplete(SelectionDropDown, SelectUseDropDown, SelectPurposeDropDown)
And then used the Declarations drop down from inside vs 2005 to select my new event. VS built the code for the handler in the page and all that was left to do was put the redirecting code in using the drop down values.
Thanks
|
|
|
|
|
im doing a samle project that i want to include in my project..
here is the sample code...
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Import Namespace=System.Web.HttpException %>
<title>Northwind Database Login
Sub doInsert(Source as Object, E as EventArgs)
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("C:\Documents and Settings\Joy.PHOENIX-1D0486C\Desktop\userId.mdb") & ";"
Dim MySQL as string = "Insert into Members (uid, pwd, fullname, email) " & _
"Values (@uid, @pwd, @fullname, @email)"
Dim MyConn As New Data.OleDb.OleDbConnection(strConn)
Dim Cmd As New Data.OleDb.OleDbCommand(MySQL, MyConn)
With Cmd.Parameters
.Add(New Data.OleDb.OleDbParameter("@uid", frmuid.Text))
.Add(New Data.OleDb.OleDbParameter("@pwd", frmpwd.Text))
.Add(New Data.OleDb.OleDbParameter("@fullname", frmfullname.Text))
.Add(New Data.OleDb.OleDbParameter("@email", frmemail.Text))
End With
MyConn.Open()
cmd.ExecuteNonQuery()
MyConn.Close
'Put a label on your page to contain the 'success' response:
lblMessage.Text = "Thank you for signing up. An email will be sent to you shortly." & _
"Your response will be needed from that email to activate your account"
End Sub
uid | <asp:textbox id="frmuid" runat="server"> | pwd | <asp:textbox id="frmpwd" runat="server"> | fullname | <asp:textbox id="frmfullname" runat="server"> | email | <asp:textbox id="frmemail" runat="server"> | <asp:button
id="button1"
="" onclick="doInsert" text="Submit" runat="server">
|
<asp:label id="lblMessage" runat="server" width="288px" forecolor="#C00000" font-size="Medium"
="" font-italic="True" font-bold="True">
--this code is like a Simple Log in and insert the data in the database.. a made already a blank database..but when i run it this is the error i've got
-System.web.HtppException-{"'(URL HERE or Data Path)\userId.mdb' is not a valid virtual path."}
-would someone describe what is the meaning of this error and what would be the solution or whatever?
_Thanks for helping
|
|
|
|
|
You are using a physical address in the call to Server.MapPath. This is not possible, as Server.MapPath is used to turn a virtual path into a physical path, so it expects a virtual path.
Just remove the call to Server.MapPath, as you already have a physical path.
---
single minded; short sighted; long gone;
|
|
|
|
|
It looks like some sort of issue with the path to the Access database that you are using. As far as I'm aware the Server.MapPath works on the same file structure as your web pages would. Eg ../database/userId.mdb instead of C:\Documents and Settings\Joy.PHOENIX-1D0486C\Desktop\userId.mdb . So put your database either in the root of your site or in a folder, named database, within the root like I have in my example path.
|
|
|
|
|
hi
ive designed a website and i want to upload it.
it uses SQL Server Express database (i store my databases in App_Data)
i use |DataDirectory| for my conection string but when i upload it it says that it has a bad Argument for attachDBFileName.
i want to know how should i upload my database? (my nonDatabase pages work fine)
i uploaded it with the Control Panel's Database Manager but when i use my new connection string it fails.
my connection is:
"server='www.host.com';User ID='admin';Password='pas';Initial Catalog='database';Connect Timeout=30"
but it says:
Cannot open database "database" requested by the login. The login failed.
Login failed for user 'admin'.
what should i do?
oh, one important thing i forgot to say is that i use Membership. how should i upload that database? i have no access to Membership database connection string
|
|
|
|
|
I am developing an application in asp.net and using C# for any code requirements.
I am bringing an old ASP project over to asp.net. The old asp project used JavaScript for much of the coding. I am trying to perform a javascript function in the C# world.
Here is the old JavaScript function:
function LoadMenuBar()
{
window.parent.parent.DisplayMenuBar.location = "menu_bar.asp";
return;
}
This function would send the menu_bar.asp file to a frame segment named DisplayMenuBar. Here is the HTML code that defines DisplayMenuBar:
My question is, how do I perform this same functionality in asp.net using C# as the code environment?
Would be very greatful for any suggestions/help/etc on this issue.
Vern
|
|
|
|
|
See displaying file is always an event that is easy to achieve in Client side. Do go for C# code for the sake of doing everything in C#.
C# is a server side language it is not a client side language.
So please use the same javascript to display( i.e. load) the aspx page.
Thanks,
Arindam D Tewary
|
|
|
|
|
Thanks for the reply. Sometimes the easy answer is so easy you cannot see it.
I will take your advise.
Thanks again, Vern
|
|
|
|
|
I am trying to execute a client side JavaScript function to send a page to a particular frame location. This is how I am doing it:
On the page being loaded, I have the following form definition:
<form
id="frmSelectionFunction"
="" onload="LoadMenuBar()">
I need the LoadMenuBar function to execute (on the client). So I removed the runat=”server” property form the form element.
Everything seems to run OK, except the LoadMenuBar function does not execute when the form is loaded.
This is the LoadMenuBar function:
function LoadMenuBar()
{
alert("Got Here");
window.parent.parent.DisplayMenuBar.location = "menu_bar.aspx";
return;
}
This script code is inserted in the page that gets loaded.
I guess my question is, why is the LoadMenuBar function not being executed?
Thanks, Vern
|
|
|
|
|
How do you work with the gridview and formview in ASP.NET so that a table updates when a user selects to update??
Ty
|
|
|
|
|
You have to use objectdatesource or sqldatasoruce or accessdatasouce
which will make your life easy.
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
hello there,again i need ur help..if i can access the data in mydatabase,lyk entering the correct password and username.how can i code opening new window when this data is correct?.i put a code in and in the button tag asp:button PostBackUrl="index.aspx",the question is the following attributes in the tag given can affect direct opening new window when the corrct Username and Password is correct?...should i used method="get" in form tag/what is the difference between the "GET" and "POST"?what is commonly used form attribute?thankx 4 helping
Im A nEWBIE programmer
|
|
|
|
|
This has to be a problem that's been solved a million times.
I need my website to create pages on the fly from a database.
Because I want Google to like my site, I don't want to use arguments: www.sitename.com\thePage.aspx?Arg1&arg2
So if you will imagine that I have a link to a page that looks like: www.sitename.com\page_arg1_arg2.aspx...
That page doesn't exist, but it looks like a real page to the search engines.
The two options that I've tried are:
1. Use 404 error trapping - but I get the error message in the browser which is ugly and probably disdained by Google. Perhaps there is a combination of transferring and setting environment settings that would make this work.
2. Use virtualPathProvider, and virtualFile. I like this solution, but I can't get it to work. Specifically, the virtualfile.getfile function is never accessed for the aspx. It is only accessed after an aspx file is interpreted (say for a jpg). Apparently the 404 error supercedes this call.
To complicate this further, I'd like to use an existing page, but pass it arguments. I'm supposing that I would have a line of code like this:
new LikeThisPage(arg1,arg2) ' from arg1_arg2.aspx<br />
then somehow used an htmltextwriter to render it to a stream?
Any ideas?
Thanks,
Grant
Everyone else's job looks easy
Everyone else's job looks easy
|
|
|
|
|
Google doesn't have any issues with arguments in the URL so there's no reason not to use them. I think your basically asking how to perform a friendly URL system that allows your to forward shorter, more english URL's on to their original more coplex ones. Eg
www.thissite.com/weather forwards to www.thissite.com/default.aspx?ShowWeather=True
This is used primarily to improve the user experience rather than improving things for the likes of search engines. Search google for asp.net friendly URLS.
|
|
|
|
|
I am developing a web application using C#.net and ASP.net.
I want to export some data to ms-word as report.
I got it now.
However, one problem is there.
If the html page contains any image, then the word document will store a REFERENCE URL to the image (I tried to save as a .doc file). So, when that image gets deleted from the server or the word document is moved to another place, the image disappears from the document!
What I need is:
How can we make the image be integrated/embedded in word document so that it remains there even after it is deleted from its location?
Thanks
|
|
|
|
|
Is there any way of grouping ASP.NET controls together?
I'd like to set a group of controls as invisible rather than having to set each individual control as invisible. Just want to cut down on the amount of code and make it more readable.
|
|
|
|
|
Use a PlaceHolder server control. That is a really good way of making a group of control visible or invisible.
Ben
|
|
|
|