|
the address was on the page where it is blank. http://localhost/sitename/default.aspx <--- this one. It should redirect to this page http://localhost/sitename/pages/default.aspx
yeah.. i'm really pissed off looking where would the error be... it should redirect on the first place. During the installation, I installed the .Net Framework first than the IIS? does it makes sense that it IIS should have been installed first than the Framework?
regards,
bryan
--- If the facts don't fit the Theory, change the facts...
|
|
|
|
|
|
i have designed one Web user control say there is button1 and button2(both button1 and button2 are visible true here).I also have taken two Web Forms say Form1 and Form. In these both forms, i want to use the Web user control i have mentioned above.But in form1, i want button1 visible true and button2 visible false.Similary in form2, i want button1 visible false and button2 visible true. Is it possible to do that using one web user control ? Or should i have to take seperate web user control ?? Currently i am using Dot Net 2005.
suchitamanandhar@hotmail.com
|
|
|
|
|
Yes you can have single form for the both depending on requirement you change the Page Rules.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
If I understand your question correctly, the answer is yes, you can implement that in a single webusercontrol. On your webusercontrol (the one that contains button1 and button2), you need to provide a public property to get/set the Visible property of the buttons. For example to have a publicly-accessible Visible property of button1, you may provide this code in your webusercontrol's codebehind:
<br />
public bool ButtonOneVisible<br />
{<br />
get{return button1.Visible;}<br />
set{button1.Visible = value;}<br />
}<br />
You can provide similar approach for button2.
Now, on Form1's codebehind, you only need to set the value of this property to true/false depending on your need. For example, on the codebehind of Form1.aspx:
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
WebUserControl1.ButtonOneVisible = true;<br />
WebUserControl1.ButtonTwoVisible = false;<br />
}<br />
}
[http://www.theunix.info/sheijin] Remember, your work is not yours alone. Somewhere, there are some codes written by others amongst us that depends on your work. By failing to see that you are part of their ecosystem, you are bound to break their code.
|
|
|
|
|
"Randz" answered what i was gng to write.
Thats the best way for doing the required job.
BUt i hope u understand the consequence of making a control's (visible=false), setting this property to false "stops" a control being rendered. That is, it wont be available to client side (javascript also).
|
|
|
|
|
that is true. thanks for the emphasis.
[http://www.theunix.info/sheijin] Remember, your work is not yours alone. Somewhere, there are some codes written by others amongst us that depends on your work. By failing to see that you are part of their ecosystem, you are bound to break their code.
|
|
|
|
|
Hello friends I want to embed a datalist inside other.I want to fill first datalist by category id and fill another datalist by productid for that particular category id.First datalist is filled correctly by category id. But how to assign datasource to second datalist depending upon category id.
|
|
|
|
|
Hi
You have to write a function and under which u have to find the nested
datalist using find method then u can use datasource property of second
datalist like.
Sub NestedBind(ByVal sender As System.Object, ByVal e As DataGridItemEventArgs)<br />
If (e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem) Then<br />
CType(e.Item.FindControl("dgridTopic"), DataGrid).DataSource = CType(e.Item.DataItem, DataRowView).CreateChildView("DPItem1")<br />
CType(e.Item.FindControl("dgridTopic"), DataGrid).DataBind()<br />
<br />
End If<br />
<br />
End Sub
and u have to call this procedure on itembound event of first datalist.
Rahul
|
|
|
|
|
Thank u Rahul Its working ........
|
|
|
|
|
|
Hi i need tool tip for each items in combobox(HTML Control)...,
Urgent need...,
Plz help me,
Regards,
Magi
|
|
|
|
|
Hello..
I understand that u need a tooltipe for "each" item in the comboBox.
Thats not possible dear, u may do it by some work around like placing a with multiple textbox, one for each item. and making div behave as comboBox.
Even i required the same functionality, but cudnt find any way out. Please post me updated if you get some better answer/solution.
Regards.
|
|
|
|
|
Hi all,
I need to Update and delete a row in datagrid control. Can anyone tell me how do to this.
I just need to show all the records from Database in the GridView and when
I say edit it should show the edited record in GridView but should not be updated in database.
Please help me with this.
Thanks in advance.
|
|
|
|
|
What class you have written for that editing and updating the records.
SSK.
|
|
|
|
|
Check this url here you will have all the articles related to Gridview
http://gridviewguy.com/CategoryDetails.aspx?categoryID=7[^]
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I dont have any idea in Asp.Net 2.0.
But in Asp.Net 1.1 in the grid you have to add the button column where Update and Delete button will be available and you can add textboxes to the appropriate column which should be updated.
VanithaVasu
|
|
|
|
|
I am using a gridview to display data from textboxes and other controls on a form.i want the grid to display when i click a button.the values which are filled in the controls,i.e, textboxes,Dropdownlist,datetimepicker etc.
pls help me
|
|
|
|
|
|
Hi Friends
how to create toggling the page.For example onmouseover the page will be rollup,onmouseout
the page will be rollout
how can i achive this in javascript
regards
saravanan
|
|
|
|
|
Hello friends,
I am developing a login & registration page for a website.
On the login page, i have provided a link for registration page. If the user don't hav username and password for authentication then he/she supposed to register to the website first.
The problem is, control is not transferring to the registration page without authenticating the user i.e i has to authenticate the user first by giving username and password, then only i am able to access Registration page. This is completely wrong logic.
I don't know where the problem is but i am sure it will be a small one. I am also attaching the code of user authentication here.
private void BtnGo_Click(object sender, System.EventArgs e)
{
if(ValidateUser(TextBox1.Text,TextBox2.Text))
{
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;
tkt=new FormsAuthenticationTicket(1,TextBox1.Text,System.DateTime.Now,System.DateTime.Now.AddMinutes(Convert.ToInt32(ConfigurationSettings.AppSettings["timeout"])),CheckBox1.Checked,"Your Custom Date");
cookiestr=FormsAuthentication.Encrypt(tkt);
ck=new HttpCookie(FormsAuthentication.FormsCookieName,cookiestr);
if(CheckBox1.Checked)
ck.Expires =tkt.Expiration;
ck.Path =FormsAuthentication.FormsCookiePath;
Response.Cookies.Add(ck);
string strredirect;
strredirect=Request["ReturnUrl"];
if(strredirect==null)
{
strredirect="login.aspx";
Response.Redirect("Test.aspx",true);
}
else
Response.Redirect("login.aspx",true);
}
This is the code for user authentication.
Please someone help me.
Thanks,
Nagendra.
|
|
|
|
|
I think, only authorized users have access to the registration page. to handle this problem,
Set the location tag in the web.config file for the registration page and give access to all users.
location path="/registration.aspx"
system.web
authorization
allow users="*"
authorization
system.web
location
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Hi John,
Thanks for the reply.
I have tried your method but its is giving a debugging error as
"Error while trying to run project: Unable to start debugging on the web server. Server side-error occured on sending debug HTTP request.
Thanks,
Nagendra.
|
|
|
|
|
Check whether tha page path in the location tag is correct. and for you kind information, web.config file is case-sentive.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Hi John,
i hav checked everything, but its still giving same error.
Thanks,
Nagendra.
|
|
|
|