|
I have usually kept a default.aspx in my project and in the page_load I have a response.redirect to the correct start up page. Seems to work ok for me.
If you don't like that solution you can go to the properties of your web site. Then go to the document tab. Click the add button and type in your start page and make sure it is the page at the top.
Hope that helps.
Ben
|
|
|
|
|
Ben:
Thanks!..I'm gonna `try it.
B.Griffin
|
|
|
|
|
Or before you do nightly maintenance, you could always modify the iis default page properties.....
|
|
|
|
|
Chris:
Will that catch a session start, no matter where
they try to jump into the app?
Thanks,
B.Griffin
|
|
|
|
|
In the Global.asax there is a session start method you can tap into.
Ben
|
|
|
|
|
Your'e right!..I did..it catches the initial link,
but once at my maint page, they can divert to any
page they want by typing it into the address bar!
So I had to take the advice of Chris on this thread
and put a check and .redirect in the page load of
every page..but, it works!..
Thanks again..you're good deed will come back to you.
|
|
|
|
|
Hi,
I have two files, one called vars.php and then the main file. Im trying to include the vars.php in the main file which works yet I have a variable $user = "nicspi_db" and when called in the main file i only get "nicspi" the _db part is cut off... does anyone know why?
Regards
|
|
|
|
|
Not without seeing the code, although I'm sure Bradml will have a million answers off to top of his head
|
|
|
|
|
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Well PHP has an excellent ability to handle this sort of thing so the cause is likely some manipulation of the string via the script. Without you giving me the code I can only suggest that you make sure you have not defined the variable a secound time with the final value.
Otherwise feel free to email me the script and I'll fix it up for you.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi,
Ihave a datagrid that Insert data in some rows. One column has RadioButtonList that contains three Items. But When I select one radiobuton, insert data in other columns and select insert data The radio button unselects itself. Why would this be happening? here is my code.
DataTable table = new DataTable();
private DataTable Fill()
{
SqlDataAdapter adapter = new SqlDataAdapter("select * from dbo.DashBoard", con);
adapter.Fill(table);
return table;
}
private void Bind()
{
dgis.DataSource = table;
dgis.DataBind();
}
private void InsertEmpty()
{
table.Rows.InsertAt(table.NewRow(), 0);
}
private void dgis_ItemCommand(object source,System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// stop editing
dgis.EditItemIndex = -1;
switch (e.CommandName)
{
case "Insert":
//dgis.EditItemIndex = e.Item.ItemIndex;
break;
case "Update":
System.Web.UI.WebControls.TextBox st=new System.Web.UI.WebControls.TextBox();
st=(System.Web.UI.WebControls.TextBox)e.Item.Cells[5].FindControl("txtobjach");
System.Web.UI.WebControls.TextBox st1=new System.Web.UI.WebControls.TextBox();
st1=(System.Web.UI.WebControls.TextBox)e.Item.Cells[4].FindControl("txtobj");
System.Web.UI.WebControls.TextBox st2=new System.Web.UI.WebControls.TextBox();
st2=(System.Web.UI.WebControls.TextBox)e.Item.Cells[3].Controls[0];
System.Web.UI.WebControls.TextBox st3=new System.Web.UI.WebControls.TextBox();
st3=(System.Web.UI.WebControls.TextBox)e.Item.Cells[2].Controls[0];
System.Web.UI.WebControls.TextBox st4=new System.Web.UI.WebControls.TextBox();
st4=(System.Web.UI.WebControls.TextBox)e.Item.Cells[1].Controls[0];
System.Web.UI.WebControls.RadioButtonList st5=new System.Web.UI.WebControls.RadioButtonList();
st5=(System.Web.UI.WebControls.RadioButtonList)e.Item.Cells[0].FindControl("rblmood");
SqlCommand myCommand=new SqlCommand();
myCommand.Connection=con;
myCommand.CommandText="insert into DashBoard (ObjectiveAchieved,Objective) values (@ObjectiveAchieved, @Objective)";
myCommand.Parameters.Add(new SqlParameter("@ObjectiveAchieved",SqlDbType.Text));
myCommand.Parameters["@ObjectiveAchieved"].Value=st.Text;
myCommand.Parameters.Add(new SqlParameter("@Objective",SqlDbType.Text));
myCommand.Parameters["@Objective"].Value=st1.Text;
myCommand.Parameters.Add(new SqlParameter("@Workinghrs",SqlDbType.Char,45));
myCommand.Parameters["@Workinghrs"].Value=st2.Text;
myCommand.Parameters.Add(new SqlParameter("@Loggedout",SqlDbType.Char,45));
myCommand.Parameters["@Loggedout"].Value=st3.Text;
myCommand.Parameters.Add(new SqlParameter("@Loggedin",SqlDbType.Char,45));
myCommand.Parameters["@Loggedin"].Value=st4.Text;
myCommand.Parameters.Add(new SqlParameter("@MoodToday",SqlDbType.Text));
myCommand.Parameters["@MoodToday"].Value=st5.DataValueField;
con.Open();
myCommand.ExecuteNonQuery();
con.Close();
dgis.EditItemIndex=-1;
BindDataGrid();
break;
case "Cancel":
break;
case "Edit":
// begin editing
dgis.EditItemIndex = e.Item.ItemIndex;
EditCommandColumn ecc = (EditCommandColumn) dgis.Columns[6];
ecc.UpdateText = "Insert";
//dgis.EditItemIndex = e.Item.ItemIndex;
break;
}
// fill and bind
Fill();
InsertEmpty();
Bind();
}
Thanks.
|
|
|
|
|
Dear All,
I am working on WSE and i have done well with WSE routing sample. In my sample the router service re directs a request to another service succesfully. Now i want to know whether a single router can redirect two different requests for two different services to the concern services. My intention is that request for Service1 and Service2 have to be redirected bby a single router. If it is possible, how to achieve this.
Awaiting the reply.
Ramesh.Kanjinghat
|
|
|
|
|
Hi
I am having trouble formatting my 'asp:Textbox' control.
It is viewed fine with IE, but the NOT with FireFox.
Any ideas ?
Thank you
Harkulwant
|
|
|
|
|
Whats wrong with it in Firefox? Can you post the markup for it?
|
|
|
|
|
cascaded dropdown listbox
hi.
i am developing a web based application in Visual WeB Developer EXPRESS.
I have a Drop down list that which is statically filled. Now i wanted that wen i select a particular field from the Drop Down List, a table of the same name shud be accessed, and a particular column be filled in the Listbox Control.
i wrote a piece of code
try
{
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "Select * from [" + DropDownList1.SelectedValue + "]";+ "'";
SqlDataReader dread = cmd.ExecuteReader();
dread.Read();
while (dread.Read())
{
ListBox1.Items.Add(dread["column_name"].ToString());
}
conn.Close();
the problem is that no row is being retrieved.. please help..
Kunal Piyush
|
|
|
|
|
cmd.CommandText = "Select * from [" + DropDownList1.SelectedValue + "]";
+ "'";
If you've just copied and pasted, then you have 2 statements on the one line. the final +"'"; is a separate statement from the cmd.CommandText .... "]"; statement
Have you tried running your code by entering in a complete dummy sql string just to check it works rather than using the dropdownlist.selectedvalue?
|
|
|
|
|
this is how it is.. it was probably due to modification.. that there was an other statement.
cmd.CommandText = "Select * from [" + DropDownList1.SelectedValue + "]";
i checked with a dummy string.. no retrieval.
also wen i had a string like this
cmd.CommandText = "Select * from '" + DropDownList1.SelectedValue + "'";
it showed an error.. Incorrect syntax near [valuename]
Kunal Piyush
|
|
|
|
|
Hi,
I'm using RadioButtons in datagrid But When I select one I can't unselect it and when I select the others they cannot unselect the other instead they are selected all at once. how could I go about this to be able select one at a time. these Radio button are in one column.
Thanks.
|
|
|
|
|
Radio buttons are grouped by their name attribute, it should be the same for all buttons you want in a group. For an ASP.NET RadioButton control you should set the GroupName property.
|
|
|
|
|
This is a bit more complicated in a datagrid, as these control properties are set by the grid (annoyingly). There are people out there who have specific custom grid column controls that you can download for free to help out with this issue:
http://www.metabuilders.com/Tools/RowSelectorColumn.aspx[^]
|
|
|
|
|
Thanks,
I realized that I had to use a RadioButtonList. But I'm having another big problem. My datagrid has too column for inserting. Before it was inserting very well But after inserting RadioButtonList I cannot Insert data anymore.
Why would be the problem. How can go about this.
|
|
|
|
|
Dear All,
My project has this files - Web.config, Global.asax
What are the important in here.
I need get complete idea about content in this file.
Any one can pls give clear idea or submit articles or links.
And also give idea about Forms Authentication / Windows Authentication ?
Regards
Kusal
|
|
|
|
|
Hi
The web.config file priority works from bottom to top. E.g if you have a folder in inetpub/wwwroot/myweb_service.
And you have a web.config file in wwwroot and myweb_service the web.config file in myweb-service take higher priority than the one in wwwroot
The web.config file have all the settings and info needed to run say your web service. It is not a good idea to store sensitive info in the web.config file as it can be accessed easily. You can however encode it, but don't ask me how, have not done it before
goodluck
hope it helps
|
|
|
|
|
Hi,
Meny thanks
Regards
Kusal
|
|
|
|
|
BLOEDHOND did a good job describing the web.config. It basicaly has the connection string for you sql server and other configuration type data. The Global.asax is a file where you can define some application events. Like application start, application error etc. These events happen the first time your web site is accessed or when your web site gets an error. You should be able to find a lot of information on these files if you just do a google search on them.
Ben
|
|
|
|