Thursday, March 29, 2012
Newbie : Form question !
I use a Unique Identifier data for my website that I get using the
Request["sid"]
That means most of my links are formatted like mypage.aspx?sid=blabla
So, I need to understand how to add the "?sid=blabla" onto a page where I
have a form with several fields
Do I have to add a hidden field to store the blabla ?
Thanks for your help
Stanyou can either add a querystring or have a hidden field (having method as
'Get' will add all the form fields as querystring parameters)..
Regards,
Augustin
"Stan SR" <stan@.pasdepam.netsunset.com> wrote in message
news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
> Hi,
> I use a Unique Identifier data for my website that I get using the
> Request["sid"]
> That means most of my links are formatted like mypage.aspx?sid=blabla
> So, I need to understand how to add the "?sid=blabla" onto a page where I
> have a form with several fields
> Do I have to add a hidden field to store the blabla ?
>
> Thanks for your help
> Stan
>
>
>
Yes. I have no doubt about this, but how to set the variable as a
queryString parameter when a page is Loaded ?
here's my case :
<form id="form1" runat="server>
<asp:CheckBox id="b" runat="server" text="test" />
</form>
In my codeBehind, I check if a "sid" url parameter is transmitted.
If not I generate one.
And I would like to place it a url parameter.
When I look at the source, I get this
<form name="form1" method="post" action="mypage.aspx" id="form1">
<input id="b" name="b"><label for "b">test</label>
</form>
What I need is to get
<form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">
Stan
"Augustin Prasanna"
> you can either add a querystring or have a hidden field (having method as
> 'Get' will add all the form fields as querystring parameters)..
> Regards,
> Augustin
> "Stan SR" <stan@.pasdepam.netsunset.com> wrote in message
> news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
>
> What I need is to get
> <form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">[/colo
r]
You could set this in Page.Form.Attributes or use the PostBackUrl
property of your submit button to send the form to the new URL.
Tim
Newbie : Form question !
I use a Unique Identifier data for my website that I get using the
Request["sid"]
That means most of my links are formatted like mypage.aspx?sid=blabla
So, I need to understand how to add the "?sid=blabla" onto a page where I
have a form with several fields
Do I have to add a hidden field to store the blabla ?
Thanks for your help
Stanyou can either add a querystring or have a hidden field (having method as
'Get' will add all the form fields as querystring parameters)..
Regards,
Augustin
"Stan SR" <stan@.pasdepam.netsunset.comwrote in message
news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
Hi,
>
I use a Unique Identifier data for my website that I get using the
Request["sid"]
That means most of my links are formatted like mypage.aspx?sid=blabla
>
So, I need to understand how to add the "?sid=blabla" onto a page where I
have a form with several fields
>
Do I have to add a hidden field to store the blabla ?
>
>
Thanks for your help
>
Stan
>
>
>
>
>
Yes. I have no doubt about this, but how to set the variable as a
queryString parameter when a page is Loaded ?
here's my case :
<form id="form1" runat="server>
<asp:CheckBox id="b" runat="server" text="test" />
</form>
In my codeBehind, I check if a "sid" url parameter is transmitted.
If not I generate one.
And I would like to place it a url parameter.
When I look at the source, I get this
<form name="form1" method="post" action="mypage.aspx" id="form1">
<input id="b" name="b"><label for "b">test</label>
</form>
What I need is to get
<form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">
Stan
"Augustin Prasanna"
Quote:
Originally Posted by
you can either add a querystring or have a hidden field (having method as
'Get' will add all the form fields as querystring parameters)..
>
Regards,
Augustin
>
"Stan SR" <stan@.pasdepam.netsunset.comwrote in message
news:%23MWDGKd7GHA.1256@.TK2MSFTNGP04.phx.gbl...
Quote:
Originally Posted by
>Hi,
>>
>I use a Unique Identifier data for my website that I get using the
>Request["sid"]
>That means most of my links are formatted like mypage.aspx?sid=blabla
>>
>So, I need to understand how to add the "?sid=blabla" onto a page where I
>have a form with several fields
>>
>Do I have to add a hidden field to store the blabla ?
>>
>>
>Thanks for your help
>>
>Stan
>>
>>
>>
>>
>>
>
>
What I need is to get
Quote:
Originally Posted by
<form name="form1" method="post" action="mypage.aspx?sid=blabla" id="form1">
You could set this in Page.Form.Attributes or use the PostBackUrl
property of your submit button to send the form to the new URL.
Tim
Monday, March 26, 2012
Newbie ? - Error on Redirect from login page error
Trying to make a login page to a website. However I don't the user to be
able to set a password, I want to control the password for everbody, and
change it w
to be used as a login page. But they all are a little diffrent, and always
cover the highlights. I would love to see something that takes me from poin
t
A to Point B. Anyway's, I have been making some progress, although slower
than I would like. So here is a snippet of my code for my login button.
Private Sub btnLogIn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogIn.Click
' Server.Transfer("main.aspx") used to go to main page
Session("User Name") = txtUN.Text
Session("Password") = txtPW.Text
FormsAuthentication.RedirectFromLoginPage(txtUN.Text, False)
End Sub
And here is my web config code
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<location path="ProtectMe.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
<system.web>
<httpHandlers>
<add verb="*" path="Users.xml"
type="System.Web.HttpForbiddenHandler"/>
</httpHandlers>
<authentication mode="Forms">
<forms name="ImsApp"
loginUrl="localhost/mmgims/Login1.aspx" protection="all"/>
</forms>
</authentication>
</system.web>
</configuration>
It is my understanding that the redirectfromloginpage should take me to the
login page if the password or User name is wrong. But this is what I get for
an error
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that
it is spelled correctly.
Requested Url: /mmgims/default.aspx
I don't have a default page, I have the login page, and the main page which
would be my home page. Again, I been taking a little bit of info from
everywhaere.
Any advise would be great!!!
Thanks to all!!!
RudyI think your problem is the loginUrl in your web.config.
Make this path relative to the web.config
so your web.config is under the root, and your login page is under
mmgims directory make it this:
loginUrl="mmgims/Login1.aspx"
leave the localhost part out of there. your page is redirecting how it
should, but it can't find the login page you specified.
let me know if that works.
DKode
Thanks for the tip, that does make sense! I'll try it out tonite and let you
know.
Rudy
"DKode" wrote:
> I think your problem is the loginUrl in your web.config.
> Make this path relative to the web.config
> so your web.config is under the root, and your login page is under
> mmgims directory make it this:
> loginUrl="mmgims/Login1.aspx"
> leave the localhost part out of there. your page is redirecting how it
> should, but it can't find the login page you specified.
> let me know if that works.
> DKode
>
thanks DKode, that did the trick!
"Rudy" wrote:
> Thanks for the tip, that does make sense! I'll try it out tonite and let y
ou
> know.
> Rudy
> "DKode" wrote:
>
Newbie ? - Error on Redirect from login page error
Trying to make a login page to a website. However I don't the user to be
able to set a password, I want to control the password for everbody, and
change it weekly. Any way, I have found alot of docs on Form Authentication
to be used as a login page. But they all are a little diffrent, and always
cover the highlights. I would love to see something that takes me from point
A to Point B. Anyway's, I have been making some progress, although slower
than I would like. So here is a snippet of my code for my login button.
Private Sub btnLogIn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogIn.Click
' Server.Transfer("main.aspx") used to go to main page
Session("User Name") = txtUN.Text
Session("Password") = txtPW.Text
FormsAuthentication.RedirectFromLoginPage(txtUN.Te xt, False)
End Sub
And here is my web config code
<?xml version="1.0" encoding="utf-8" ?>
<configuration
<location path="ProtectMe.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location
<system.web
<httpHandlers>
<add verb="*" path="Users.xml"
type="System.Web.HttpForbiddenHandler"/>
</httpHandlers
<authentication mode="Forms">
<forms name="ImsApp"
loginUrl="localhost/mmgims/Login1.aspx" protection="all"/
</forms>
</authentication
</system.web>
</configuration>
It is my understanding that the redirectfromloginpage should take me to the
login page if the password or User name is wrong. But this is what I get for
an error
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that
it is spelled correctly.
Requested Url: /mmgims/default.aspx
I don't have a default page, I have the login page, and the main page which
would be my home page. Again, I been taking a little bit of info from
everywhaere.
Any advise would be great!!!
Thanks to all!!!
RudyI think your problem is the loginUrl in your web.config.
Make this path relative to the web.config
so your web.config is under the root, and your login page is under
mmgims directory make it this:
loginUrl="mmgims/Login1.aspx"
leave the localhost part out of there. your page is redirecting how it
should, but it can't find the login page you specified.
let me know if that works.
DKode
Thanks for the tip, that does make sense! I'll try it out tonite and let you
know.
Rudy
"DKode" wrote:
> I think your problem is the loginUrl in your web.config.
> Make this path relative to the web.config
> so your web.config is under the root, and your login page is under
> mmgims directory make it this:
> loginUrl="mmgims/Login1.aspx"
> leave the localhost part out of there. your page is redirecting how it
> should, but it can't find the login page you specified.
> let me know if that works.
> DKode
>
thanks DKode, that did the trick!
"Rudy" wrote:
> Thanks for the tip, that does make sense! I'll try it out tonite and let you
> know.
> Rudy
> "DKode" wrote:
> > I think your problem is the loginUrl in your web.config.
> > Make this path relative to the web.config
> > so your web.config is under the root, and your login page is under
> > mmgims directory make it this:
> > loginUrl="mmgims/Login1.aspx"
> > leave the localhost part out of there. your page is redirecting how it
> > should, but it can't find the login page you specified.
> > let me know if that works.
> > DKode
newbie configuration-type issue
I have a folder named CPR with a subfolder, V2. I built a small website in
a solution in CPR, dropped in on the webserver (third-party hosted) and it
runs. I've lately been working on a replacement version in the V2
subfolder, which is in a separate solution.
When I run v2's version from the development machine, it runs fine. When I
drop it on the Web server and try to run it or copy everything over to
another development machine and try to run it in VS, I receive the error:
Could not load type 'CPRInc.WebForm1'.
and points to my Page directive:
<%@dotnet.itags.org. Page language="c#" Codebehind="CPRTemplate.aspx.cs"
AutoEventWireup="false" Inherits="CPR.WebForm1" %>
This feels like a configuration problem like one box uses relative pathing
while the others don's SORT of thing. Any ideas?
TIA,
JohnOn your machine that folder is probably setup as a virtual=
directory where on the webserver it is probably not. The=
virtual directory can have a seperate bin directory which is=
used by .Net to store the DLL's that your files are referencing.=
To make it work you can either create the folder as a vitual=
directory (i.e., Application) or just add the DLL's that the V2=
application uses to the Bin directory of the root folder.
Alan Washington
> All right, there's something stupid I'm missing.
> I have a folder named CPR with a subfolder, V2. I built a=
small website in
> a solution in CPR, dropped in on the webserver (third-party=
hosted) and it
> runs. I've lately been working on a replacement version in the=
V2
> subfolder, which is in a separate solution.
> When I run v2's version from the development machine, it runs=
fine. When I
> drop it on the Web server and try to run it or copy everything=
over to
> another development machine and try to run it in VS, I receive=
the error:
> Could not load type 'CPRInc.WebForm1'.
> and points to my Page directive:
> <%@. Page language=3D"c#" Codebehind=3D"CPRTemplate.aspx.cs"
> AutoEventWireup=3D"false" Inherits=3D"CPR.WebForm1" %>
> This feels like a configuration problem like one box uses=
relative pathing
> while the others don's SORT of thing. Any ideas?
> TIA,
> John
>
User submitted from AEWNET (http://www.aewnet.com/)
newbie configuration-type issue
I have a folder named CPR with a subfolder, V2. I built a small website in
a solution in CPR, dropped in on the webserver (third-party hosted) and it
runs. I've lately been working on a replacement version in the V2
subfolder, which is in a separate solution.
When I run v2's version from the development machine, it runs fine. When I
drop it on the Web server and try to run it or copy everything over to
another development machine and try to run it in VS, I receive the error:
Could not load type 'CPRInc.WebForm1'.
and points to my Page directive:
<%@dotnet.itags.org. Page language="c#" Codebehind="CPRTemplate.aspx.cs"
AutoEventWireup="false" Inherits="CPR.WebForm1" %
This feels like a configuration problem like one box uses relative pathing
while the others don's SORT of thing. Any ideas?
TIA,
JohnOn your machine that folder is probably setup as a virtualdirectory where on the webserver it is probably not. Thevirtual directory can have a seperate bin directory which isused by .Net to store the DLL's that your files are referencing.To make it work you can either create the folder as a vitualdirectory (i.e., Application) or just add the DLL's that the V2application uses to the Bin directory of the root folder.
Alan Washington
> All right, there's something stupid I'm missing.
> I have a folder named CPR with a subfolder, V2. I built asmall website in
> a solution in CPR, dropped in on the webserver (third-partyhosted) and it
> runs. I've lately been working on a replacement version in theV2
> subfolder, which is in a separate solution.
> When I run v2's version from the development machine, it runsfine. When I
> drop it on the Web server and try to run it or copy everythingover to
> another development machine and try to run it in VS, I receivethe error:
> Could not load type 'CPRInc.WebForm1'.
> and points to my Page directive:
> <%@. Page language="c#" Codebehind="CPRTemplate.aspx.cs"
> AutoEventWireup="false" Inherits="CPR.WebForm1" %>
> This feels like a configuration problem like one box usesrelative pathing
> while the others don's SORT of thing. Any ideas?
> TIA,
> John
>
User submitted from AEWNET (http://www.aewnet.com/)
Newbie current Page link Question
I everyone just wondering how i can pull out the current page link in the code behind page.
Ie say my website is:http://www.webpage.com/index.aspx
so say i am inside this page how do i extract the full link "http://www.webpage.com/index.aspx" to make it availabe to the page that is index.aspx
Hope i am making some sense
Kevin
Hi,
would Request.Urlhelp you?
Newbie DataTable question
Just playing around with rewriting my website in .Net, I want to add a
record to my database table, in the old ADO, it was simple you could
create a connection and recordset and then rs.AddNew etc... in .Net it
seems they recommend that you populate a DataTable then use the
NewRow method
Isnt this bringing back a entire copy of the table (in this case 40,000
users), if so isn't this very inefficient? I know you can run a
insert via a ExecuteNonQuery which is the way I have done it in the
past (usually passing parameters to stored procs)
But I would have thought you should be able to add a row (Datarow) in
this case to a table without returning the entire table when you
connect to it.
Probably being very stupid
heres my code
try
{
// Initializations
string database = "MyDB.mdb";
string connectionString =
@dotnet.itags.org."Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\Web\Database\" +
database;
//connection
OleDbConnection cnn = new OleDbConnection();
cnn.ConnectionString = connectionString;
cnn.Open();
OleDbCommand com = cnn.CreateCommand();
com.CommandText = "Select * from tblUser";
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = com;
//DataSet ds = new DataSet();
//da.Fill(ds, "Users");
DataTable dt = new DataTable();
da.Fill(dt);
//DataRow dr = dt.Rows[0];
DataRow dr = dt.NewRow();
dr["FirstName"] = FirstName.ToString();
dr["Surname"] = Surname.ToString();
dr["Email"] = Email.ToString();
dt.Rows.Add(dr);
da.Update(dt);
//close up
cnn.Close();
}
catch (OleDbException ee)
{
Console.WriteLine(ee.ToString());
}the notion of in-memory datasets, is you only keep a copy of what you need.
the premise is that normally you only need a subset of the data. a dataset
keeps track of the status of a row (new, modified,deleted,unchanged). then
the adapter can look at the row status to determine whether to insert,
delete, update, or do nothing.
in your case you are loading the dataset solely to get the structure. you
could use the folowwing statement.
com.CommandText = "Select * from tblUser where 1 = 0";
which would only return column info and no data. a better approach is to use
typed datasets. here you use a wizard to build a dataset class that initials
the table and column info. this removes the requirement to do a dummy
database select. also you get a dot notion for accessing column data.
-- bruce (sqlwork.com)
"Ben" <BenScott@.aemail4u.com> wrote in message
news:1151423636.132121.107680@.75g2000cwc.googlegro ups.com...
> Stupid question for the day,
>
> Just playing around with rewriting my website in .Net, I want to add a
> record to my database table, in the old ADO, it was simple you could
> create a connection and recordset and then rs.AddNew etc... in .Net it
> seems they recommend that you populate a DataTable then use the
> NewRow method
>
> Isnt this bringing back a entire copy of the table (in this case 40,000
> users), if so isn't this very inefficient? I know you can run a
> insert via a ExecuteNonQuery which is the way I have done it in the
> past (usually passing parameters to stored procs)
>
> But I would have thought you should be able to add a row (Datarow) in
> this case to a table without returning the entire table when you
> connect to it.
>
> Probably being very stupid
> heres my code
> try
> {
> // Initializations
> string database = "MyDB.mdb";
> string connectionString =
> @."Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\Web\Database\" +
> database;
> //connection
> OleDbConnection cnn = new OleDbConnection();
> cnn.ConnectionString = connectionString;
> cnn.Open();
> OleDbCommand com = cnn.CreateCommand();
> com.CommandText = "Select * from tblUser";
> OleDbDataAdapter da = new OleDbDataAdapter();
> da.SelectCommand = com;
> //DataSet ds = new DataSet();
> //da.Fill(ds, "Users");
> DataTable dt = new DataTable();
> da.Fill(dt);
> //DataRow dr = dt.Rows[0];
> DataRow dr = dt.NewRow();
> dr["FirstName"] = FirstName.ToString();
> dr["Surname"] = Surname.ToString();
> dr["Email"] = Email.ToString();
> dt.Rows.Add(dr);
> da.Update(dt);
> //close up
> cnn.Close();
> }
> catch (OleDbException ee)
> {
> Console.WriteLine(ee.ToString());
> }
thanks Bruce,
yeah as you where writing i had tried that, bit quicker, but then it
wont allow me to insert data
"Update requires a valid InsertCommand when passed DataRow collection
with new rows."
so i guess i need to change
da.SelectCommand = com;
to
da.InsertCommand = com;
that doesnt work :(. any more words of wisdom? the main reason i am
doing this is to avoid having to handle what data is being put into
each field when the users submit the data. creating a Insert string
seem to me the wrong way to do this.
Newbie DataTable question
Just playing around with rewriting my website in .Net, I want to add a
record to my database table, in the old ADO, it was simple you could
create a connection and recordset and then rs.AddNew etc... in .Net it
seems they recommend that you populate a DataTable then use the
NewRow method
Isnt this bringing back a entire copy of the table (in this case 40,000
users), if so isn't this very inefficient? I know you can run a
insert via a ExecuteNonQuery which is the way I have done it in the
past (usually passing parameters to stored procs)
But I would have thought you should be able to add a row (Datarow) in
this case to a table without returning the entire table when you
connect to it.
Probably being very stupid
heres my code
try
{
// Initializations
string database = "MyDB.mdb";
string connectionString =
@dotnet.itags.org."Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\Web\Database\" +
database;
//connection
OleDbConnection cnn = new OleDbConnection();
cnn.ConnectionString = connectionString;
cnn.Open();
OleDbCommand com = cnn.CreateCommand();
com.CommandText = "Select * from tblUser";
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = com;
//DataSet ds = new DataSet();
//da.Fill(ds, "Users");
DataTable dt = new DataTable();
da.Fill(dt);
//DataRow dr = dt.Rows[0];
DataRow dr = dt.NewRow();
dr["FirstName"] = FirstName.ToString();
dr["Surname"] = Surname.ToString();
dr["Email"] = Email.ToString();
dt.Rows.Add(dr);
da.Update(dt);
//close up
cnn.Close();
}
catch (OleDbException ee)
{
Console.WriteLine(ee.ToString());
}the notion of in-memory datasets, is you only keep a copy of what you need.
the premise is that normally you only need a subset of the data. a dataset
keeps track of the status of a row (new, modified,deleted,unchanged). then
the adapter can look at the row status to determine whether to insert,
delete, update, or do nothing.
in your case you are loading the dataset solely to get the structure. you
could use the folowwing statement.
com.CommandText = "Select * from tblUser where 1 = 0";
which would only return column info and no data. a better approach is to use
typed datasets. here you use a wizard to build a dataset class that initials
the table and column info. this removes the requirement to do a dummy
database select. also you get a dot notion for accessing column data.
-- bruce (sqlwork.com)
"Ben" <BenScott@.aemail4u.com> wrote in message
news:1151423636.132121.107680@.75g2000cwc.googlegroups.com...
> Stupid question for the day,
>
> Just playing around with rewriting my website in .Net, I want to add a
> record to my database table, in the old ADO, it was simple you could
> create a connection and recordset and then rs.AddNew etc... in .Net it
> seems they recommend that you populate a DataTable then use the
> NewRow method
>
> Isnt this bringing back a entire copy of the table (in this case 40,000
> users), if so isn't this very inefficient? I know you can run a
> insert via a ExecuteNonQuery which is the way I have done it in the
> past (usually passing parameters to stored procs)
>
> But I would have thought you should be able to add a row (Datarow) in
> this case to a table without returning the entire table when you
> connect to it.
>
> Probably being very stupid
> heres my code
> try
> {
> // Initializations
> string database = "MyDB.mdb";
> string connectionString =
> @."Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\Web\Database\" +
> database;
> //connection
> OleDbConnection cnn = new OleDbConnection();
> cnn.ConnectionString = connectionString;
> cnn.Open();
> OleDbCommand com = cnn.CreateCommand();
> com.CommandText = "Select * from tblUser";
> OleDbDataAdapter da = new OleDbDataAdapter();
> da.SelectCommand = com;
> //DataSet ds = new DataSet();
> //da.Fill(ds, "Users");
> DataTable dt = new DataTable();
> da.Fill(dt);
> //DataRow dr = dt.Rows[0];
> DataRow dr = dt.NewRow();
> dr["FirstName"] = FirstName.ToString();
> dr["Surname"] = Surname.ToString();
> dr["Email"] = Email.ToString();
> dt.Rows.Add(dr);
> da.Update(dt);
> //close up
> cnn.Close();
> }
> catch (OleDbException ee)
> {
> Console.WriteLine(ee.ToString());
> }
>
thanks Bruce,
yeah as you where writing i had tried that, bit quicker, but then it
wont allow me to insert data
"Update requires a valid InsertCommand when passed DataRow collection
with new rows."
so i guess i need to change
da.SelectCommand = com;
to
da.InsertCommand = com;
that doesnt work :(. any more words of wisdom? the main reason i am
doing this is to avoid having to handle what data is being put into
each field when the users submit the data. creating a Insert string
seem to me the wrong way to do this.
Saturday, March 24, 2012
newbie help
1 page website. Something like a PWP. What we would like to have it each
user would have their own url e.g. http://users.domain.com/username1,
http://users.domain.com/username2. Now instead of having to setup a new
virtual dir in IIS everytime a new user is to be setup I was wondering if
there is anyway to accomplish this in asp.net without having to build an
ISAPI Filter. Ideally I would really like to have only 1 page called
portal.aspx. If somehow I can have some code that will intercept the call
and pass the username as a querystring parameter to portal.aspx, the rest of
the work will be done by that page. I would greatly appreciate if someone
can point me in the right direction here.
many thanks in advance,
RPthis may be of interest to you, I've never done it, but the beginning =
example looks to be about what you are trying to accomplish.
http://www.codeproject.com/aspnet/URLRewriter.asp
"RP" <rp@.nospam.com> wrote in message =
news:O6BNelxTEHA.1472@.TK2MSFTNGP12.phx.gbl...
> Hi all, we plan on implementing a project where we will provide our =
users a
> 1 page website. Something like a PWP. What we would like to have it =
each
> user would have their own url e.g. http://users.domain.com/username1,
> http://users.domain.com/username2. Now instead of having to setup a =
new
> virtual dir in IIS everytime a new user is to be setup I was wondering =
if
> there is anyway to accomplish this in asp.net without having to build =
an
> ISAPI Filter. Ideally I would really like to have only 1 page called
> portal.aspx. If somehow I can have some code that will intercept the =
call
> and pass the username as a querystring parameter to portal.aspx, the =
rest of
> the work will be done by that page. I would greatly appreciate if =
someone
> can point me in the right direction here.
>=20
> many thanks in advance,
> RP
>=20
>
Thank you. That is just what I needed.
"Raterus" <raterus@.spam.org> wrote in message
news:uv2OmyxTEHA.1244@.TK2MSFTNGP10.phx.gbl...
this may be of interest to you, I've never done it, but the beginning
example looks to be about what you are trying to accomplish.
http://www.codeproject.com/aspnet/URLRewriter.asp
"RP" <rp@.nospam.com> wrote in message
news:O6BNelxTEHA.1472@.TK2MSFTNGP12.phx.gbl...
> Hi all, we plan on implementing a project where we will provide our users
a
> 1 page website. Something like a PWP. What we would like to have it each
> user would have their own url e.g. http://users.domain.com/username1,
> http://users.domain.com/username2. Now instead of having to setup a new
> virtual dir in IIS everytime a new user is to be setup I was wondering if
> there is anyway to accomplish this in asp.net without having to build an
> ISAPI Filter. Ideally I would really like to have only 1 page called
> portal.aspx. If somehow I can have some code that will intercept the call
> and pass the username as a querystring parameter to portal.aspx, the rest
of
> the work will be done by that page. I would greatly appreciate if someone
> can point me in the right direction here.
> many thanks in advance,
> RP
>
newbie help
1 page website. Something like a PWP. What we would like to have it each
user would have their own url e.g. http://users.domain.com/username1,
http://users.domain.com/username2. Now instead of having to setup a new
virtual dir in IIS everytime a new user is to be setup I was wondering if
there is anyway to accomplish this in asp.net without having to build an
ISAPI Filter. Ideally I would really like to have only 1 page called
portal.aspx. If somehow I can have some code that will intercept the call
and pass the username as a querystring parameter to portal.aspx, the rest of
the work will be done by that page. I would greatly appreciate if someone
can point me in the right direction here.
many thanks in advance,
RPthis may be of interest to you, I've never done it, but the beginning example looks to be about what you are trying to accomplish.
http://www.codeproject.com/aspnet/URLRewriter.asp
"RP" <rp@.nospam.com> wrote in message news:O6BNelxTEHA.1472@.TK2MSFTNGP12.phx.gbl...
> Hi all, we plan on implementing a project where we will provide our users a
> 1 page website. Something like a PWP. What we would like to have it each
> user would have their own url e.g. http://users.domain.com/username1,
> http://users.domain.com/username2. Now instead of having to setup a new
> virtual dir in IIS everytime a new user is to be setup I was wondering if
> there is anyway to accomplish this in asp.net without having to build an
> ISAPI Filter. Ideally I would really like to have only 1 page called
> portal.aspx. If somehow I can have some code that will intercept the call
> and pass the username as a querystring parameter to portal.aspx, the rest of
> the work will be done by that page. I would greatly appreciate if someone
> can point me in the right direction here.
>
> many thanks in advance,
> RP
>
Thank you. That is just what I needed.
"Raterus" <raterus@.spam.org> wrote in message
news:uv2OmyxTEHA.1244@.TK2MSFTNGP10.phx.gbl...
this may be of interest to you, I've never done it, but the beginning
example looks to be about what you are trying to accomplish.
http://www.codeproject.com/aspnet/URLRewriter.asp
"RP" <rp@.nospam.com> wrote in message
news:O6BNelxTEHA.1472@.TK2MSFTNGP12.phx.gbl...
> Hi all, we plan on implementing a project where we will provide our users
a
> 1 page website. Something like a PWP. What we would like to have it each
> user would have their own url e.g. http://users.domain.com/username1,
> http://users.domain.com/username2. Now instead of having to setup a new
> virtual dir in IIS everytime a new user is to be setup I was wondering if
> there is anyway to accomplish this in asp.net without having to build an
> ISAPI Filter. Ideally I would really like to have only 1 page called
> portal.aspx. If somehow I can have some code that will intercept the call
> and pass the username as a querystring parameter to portal.aspx, the rest
of
> the work will be done by that page. I would greatly appreciate if someone
> can point me in the right direction here.
> many thanks in advance,
> RP
Newbie here need some help..
Basically do you have any advice on how i should go about it
Thanks
Zim
This is possible there are 2 ways of doing so.
A) Create an administration section that has a few pages to modify the prices / items/ personel information or whatnot
B) Integrate a CMS (content management solution) that will modify the xml or html or aspx directly and save it.
If you are interested in B Telerik RAD has a nice set of controls , one of them being a cms solution. If you want a cost effective solution
get a good book on ado.net look at the update/delete/ insert and create a simple admin section with a login.
Good luck with your site.
Thursday, March 22, 2012
Newbie looking for help... Data driven navigation
Is it possible to generate ASP.net website navigation based entirely on SQL queries?
If so, is it better to generate a static sitemap by running these queries only when a change is made to the database,
or
is it better to allow the queries to run "realtime" on page load and whenever a link is clicked?
Sorry if I'm not too clear, I'm still "extremely" wet behind the ears. ;-)
Thanks in advance,
Jeff
Well not sure if this is the answer you are looking for, but Asp.net 2.0 has a very good new feature Site Map where you can use the Site Map Provider to configure your Navigation of your website.
Hi,
Take a look at these tutorials
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/sitemapdatasource.aspx
http://www.asp.net/learn/data-access/tutorial-62-cs.aspx
One thing you might want to do is cache the SiteMap the first time your page load, that way you will avoid unnecessary db roundtrips.
However if your SiteMap is going to be changing all the time than you can leave the caching out.
Goodluck
The second link is exactly what I was looking for. Thanks.
The link you posted is appending an extra character though, breaking the link, so I reposted it below. (This link points to the VB tutorial)
http://www.asp.net/learn/data-access/tutorial-62-vb.aspx
Jeff
Friday, March 16, 2012
Newbie need with asp.net configuration(vista)
I uploaded my website from Ms EW and I click on the asp.net configuration and I get an error : asp.net server failed to listening on port
Error message: An attempt was made to access a socket in a way that is forbidden by its access permission
Error: Unable to connect to visual studio local host web server
It was working properly b4. don't know what to do please help
Is this link of any help?
http://forums.asp.net/p/1135310/1813260.aspx
It sounds similar but the problem is I need step by step solution on how to resolve this problem. I don't know where I went wrong I tried to repair and reinstall but no luck. How do I resolve this issue
Hi Niuboy,
Based on my understanding, no matter what you do in the ASP.NET Configuration Manager to configure your application, you will get the error message: asp.net server failed to listening on port. And you OS is Vista. If I have misunderstood you, please feel free to let me know.
To better understand your issue, could you please confirm the following information:
Is the web application a File System-based Web site or an IIS-based web site?
Thanks for the help I fixed it was my fire wall but I'm having problem with my login page
http://forums.asp.net/t/1137641.aspx
Newbie needs CAPTCHA help...
Is anyone patient enough to walk me through this?
TIA!
Brooke
Take a look at this article -CAPTCHA Image
HTH,
Ryan
newbie on asp.net 2.0
just send DLL's to the final webserver instead of all the code?
VictorYes, but I don't know how myself yet. Try this...
search term: compilation site:msdn2.microsoft.com
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
<lasalsatx@.newsgroups.nospam> wrote in message
news:eCqKISLBGHA.1028@.TK2MSFTNGP11.phx.gbl...
> Is there a way to have back a way to compile all the code on a website and
> just send DLL's to the final webserver instead of all the code?
> Victor
>
look at the vs2005 publish step. if you are using notepad instead, look at
the aspnet_compiler switches.
-- bruce (sqlwork.com)
<lasalsatx@.newsgroups.nospam> wrote in message
news:eCqKISLBGHA.1028@.TK2MSFTNGP11.phx.gbl...
> Is there a way to have back a way to compile all the code on a website and
> just send DLL's to the final webserver instead of all the code?
> Victor
>
lasalsatx@.newsgroups.nospam wrote:
> Is there a way to have back a way to compile all the code on a
> website and just send DLL's to the final webserver instead of all the
> code?
> Victor
You can use the Publish feature in VS 2005. If you want more control over
the process, you can use the Web Deployment Projects add-in to VS 2005:
http://msdn.microsoft.com/asp.net/r...dp/default.aspx
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
Merry Christmas from JIMCO Software!
Newbie needs VWDE deployment help. Need to import database from local machine to shared ho
Greetings,
I'm trying to migrate a website on shared hosting (Godaddy) from Classic ASP to ASP.Net. Having one major issue.
I have figured out that when you create roles and users in VWDE, it creates a database(aspnetdb.mdf) in the App_Data directory and that is where the informaion is stored. On my shared hosting through Godaddy, you can select "schema features" that sets up your SQL database with all the tables the same (or at least very similar) to the aspnetdb database.
I've been wading through countless posts regarding issues with Godaddy / ASP,Net. Most of the posts are guys having problems with getting a personal starter website running. The resolution involves an .sql file. The the t-SQL statements are cut and pasted into an online tool that godaddy has on their site. This then populates the database. How that file gets created I don't know.
Long story short (oops, too late for that!), how can I export my aspnetdb.mdf data into an .sql file that I can then cut and paste into godaddy's online tool?
Important point -- You cannot connect remotely to the SQL server with godaddy so that option's out.
Please advise,
Thanks
Dave.
So are you wanting to generate sql scripts to duplicate the database you have created locally on Go Daddy's server correct? If you are using enterprise manager you should be able to generate the scripts with a right click option. When I setup membership and roles for a 2.0 site I utilized a free tool I found online somewhere - this tool allowed me to connect directly to my hosting company's sql server and modifiy users directly, but like you said you can't do that with GoDaddy.When I'm in SQL Server Management Studio Exprees, I can attach to the aspnetdb file and see the little bit of data I have in there. When I right click on a table and go "Script Table as >" ! "Insert to >" | "File..." it gives me this:
INSERT INTO [C:\DOCUMENTS AND SETTINGS\COMPAQ_OWNER\MY DOCUMENTS\VISUAL STUDIO 2005\KOKOFEES\APP_DATA\ASPNETDB.MDF].[dbo].[aspnet_Users]
([ApplicationId]
,[UserId]
,[UserName]
,[LoweredUserName]
,[MobileAlias]
,[IsAnonymous]
,[LastActivityDate])
VALUES
(<ApplicationId, uniqueidentifier,>
,<UserId, uniqueidentifier,>
,<UserName, nvarchar(256),>
,<LoweredUserName, nvarchar(256),>
,<MobileAlias, nvarchar(16),>
,<IsAnonymous, bit,>
,<LastActivityDate, datetime,>)
There are 3 rows of data in this table, What am I doing wrong?
Hmm... not really sure. Have you researched the bcp utility? I'm not sure if it's included with the Express edition. Also you can google Bulk Insert and you should get some ideas. Here's a link to a solution in T-SQL that inserts data into a table from text files.
http://www.sqlteam.com/item.asp?ItemID=3207