|
Hi all
can anybody tell me how to access profile's properties described in web.config.
I write this code in web.config
<profile defaultprovider="MySqlProvider">
<providers>
....
<properties>
<add name="FirstName" type="String">
<add name="LastName" type="String">
Now,I want to access these properties in my code.
when I write like this -
Profile.FirstName = "AAA";
It gives an error for "FirstName".
can anybody tell me how to access these properties.
thanks.
|
|
|
|
|
Hi all
can anybody tell me how to access profile's properties described in web.config.
I write this code in web.config
....
profile defaultProvider="SqlProvider
providers
....
providers
properties
add name="FirstName" type="String"
add name="LastName" type="String
properties
profile
...
Now,I want to access these properties in my code.
when I write like this -
Profile.FirstName = "AAA";
It gives an error for "FirstName".
can anybody tell me how to access these properties.
thanks.
|
|
|
|
|
Hi All,
I have the following code :
]]>
<title>Untitled PageDefault.aspx.cs
<asp:gridview id="kibrom" runat="server" autogeneratecolumns="False" datasourceid="SqlDataSource1">
<columns> <asp:boundfield datafield="Destination" headertext="Destination" sortexpression="Destination">
<asp:boundfield datafield="MemberID" headertext="MemberID" sortexpression="MemberID">
<asp:boundfield datafield="FlightStatus" headertext="FlightStatus" sortexpression="FlightStatus">
<asp:boundfield datafield="ArrivalDate" headertext="ArrivalDate" sortexpression="ArrivalDate">
<asp:boundfield datafield="FlownMiles" headertext="FlownMiles" sortexpression="FlownMiles">
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="">]]>"
SelectCommand="SELECT [Destination], [MemberID], [FlightStatus], [ArrivalDate], [FlownMiles] FROM [FlightData]">
to automatically refresh a data grid.How ever when i run the page it comes with an error saying
Error occurred: " + err.Message
Can any one help?
Thank you very much
|
|
|
|
|
Hi,
I have 2 different applications, one is forms authentication and the other is windows authentication. I have a link to redirect to the application-2 (Windows authentication) from the application-1 (Forms authentication). I don't want the windows authentication dialog box to appear when clicking the link, so my forms authentication will talk to the active directory using LDAP and verifies the username and password and creates a cookie in the application-1. I need a help, how to set the credential to the windows authentication using forms authentication. My application-2 is BI application, it can work only through windows authentication. Please help!!!
Thanks
|
|
|
|
|
I am new entry in asp.net programming with VB.
I did work in VB past two years.
Now I want some help from your knowledge.
I am creating form with three text box using address typing
textbox1 as name
textbox2 as address line 1
textbox3 as address line 2
I type name then press enter key. The cursor go to next textbox2.
How to made it in this action?
In VB do this action using KeyPress event, but how to made in asp.net
Please give your suggestions with sample coding.
Thanking you,
abglorie
|
|
|
|
|
check TabIndex property for controls
siri
|
|
|
|
|
do the follwing steps
step1:
<asp:textbox onkeypress="return change_focus(this);" id="TextBox1" runat="server" width="137px">
step2:
function change_focus(e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (event) keycode = event.keyCode;
else if (e) keycode = e.which;
else return true;
if( keycode == 13 )
{
document.form1.TextBox2.focus();
}
}
this steps solve ur problem
|
|
|
|
|
abglorie wrote: I type name then press enter key. The cursor go to next textbox2.
How to made it in this action?
hi abglorie,
If you are doing asp.net that means by pressing Enter you call round trip OR make page to visit server. So either you use TabIndex property of textbox or call javascript function on keypress event which changes focus of textboxes. But according to me it's better to use TabIndex property becuase Enter button is important for sever side execution also no need to call javascript function each time after pressing Enter.
Hope you will choose best solution.
Dilip Kumar Vishwakarma
|
|
|
|
|
Hi, I develop a project in ASp.net in my project i use java script function to add textbox value to Dropdownlist when i click ASp.Butoon the Dropdownlist values age disappeared i can't get dropdownlist values how can i get pls help me
sn-asp:TextBox
list-asp:DropDownList
function Button8_onclick()
{
var t
alert("Hai");
//alert(document.form1.elements["dl"].value);
//alert(document.getElementById("sn2").value);if(document.getElementById("sn").value!="")
{
if(document.getElementById("list").value=="1")
{
t = document.getElementById("sn").value
st = new Option(t,t)document.getElementById("snum1").add(st);
}
if(document.getElementById("list").value=="2")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum2").add(st);
}
if(document.getElementById("list").value=="3")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum3").add(st);
}
if(document.getElementById("list").value=="4")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum4").add(st);
}
if(document.getElementById("list").value=="5")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum5").add(st);
}
if(document.getElementById("list").value=="6")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum6").add(st);
}
if(document.getElementById("list").value=="7")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum7").add(st);
}
if(document.getElementById("list").value=="8")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum8").add(st);
}
if(document.getElementById("list").value=="9")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum9").add(st);
}
if(document.getElementById("list").value=="10")
{
t = document.getElementById("sn").value
st = new Option(t,t)
document.getElementById("snum10").add(st);
}
}
code Window protected void Button10_Click(object sender, EventArgs e)
{
for (int j = 0; j < snum10.Items.Count; j++)
{
//tListt.Items.Add(snListt.Items[j].ToString());
snd[10] = snd[10] + "/" + snum10.Items[j].ToString();
}
}
snd[] string Array
snum1 DropDownlist
modified on Thursday, January 31, 2008 10:49:32 PM
|
|
|
|
|
Hi
Any one can tell me how we can implement "disscussion board" with asp.net
thanks
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
|
|
|
|
Hi;
I am trying to adapt some code from an article "Editable Nested GridView" by Satya Kanithi, on this site.
In my code I added a third grid, and in it I want to be able to page.
However when I click on a page number my gridview3_PageIndexChanging() event gives me this error
message "No default member found for type Gridview".
What have I failed to do ?
Thanks for any ideas
|
|
|
|
|
Hi,
I am stuck in a prob... I am editing the DataGrid where I have populated the data from DB. Now after editing the particular row I need to update it. I am able to edit but don’t know how to update it as ‘e’(GridViewUpdateEventArgs) is not giving me values...(protected void UpdatingRecord(object sender, GridViewUpdateEventArgs e))
I am copy pasting edit function (which is fine) and Update function which is not working.
protected void EditRecord(object sender, GridViewEditEventArgs e)
{
BindData(); // here I am calling function which opens the DB connection n all...
GridView1.EditIndex = e.NewEditIndex;
GridView1.DataBind();
}
Function not working or donno how to do... where ‘e’ is not giving values.. string 'str' is ‘null’ always...
protected void UpdatingRecord(object sender, GridViewUpdateEventArgs e)
{
//GridView1.UpdateRow(e.RowIndex, true); //this stmt goes into recursion...
GridViewRow row = GridView1.Rows[e.RowIndex];
string str = GridView1.Rows[e.RowIndex].Cells[1].Text; // for the time being hardcoded cell
}
I am getting 'str' as 'null'. Just tell me how to commit the row after editing it to update row coz just now while debugging I got to know that only the row which I am editing is returning ‘null’ but in watch window I changed the rowindex manually to diff row index to see if I am getting values and ‘e’ is showing all values for every column!
regards,
Supriya Tonape
|
|
|
|
|
Hi all,
I have this problem with my visual studio :
When i try execute my code i find :-------
"Unable to connect to visual studio's local web server"--
I have done a new installation howeve it didnot solve the problem.
Please advice
|
|
|
|
|
What Version of Visual Studio you are having?
Did you checked whether IIS is installed in your machine? If it is installed, check whether you have .NET version is properly configured with the IIS.
modified on Friday, February 01, 2008 6:50:41 AM
|
|
|
|
|
|
Here is what I’m trying to achieve:
I want to write a class that I can add gridview functions like Sorting and other common functions. Then have aspx pages that contain gridviews inherit from this class so I won’t have to write the same functions on every aspx page.
Every time I need to add functionality to a gridview, I have to add it to all the gridviews. I want to be able to add it to only one class.
I tried a usercontrol with a gridview but it didn’t work for me.
Thank you,
Martin
|
|
|
|
|
I'm using forms authentication on my site, and I want the login to be persistent (saved in a cookie?) for a number of days so that the user doesn't have to login each time he visits. Here's the code I use on my login page:
if (membership.ValidateUser(this.username.Text, this.password.Text))
{
FormsAuthentication.Initialize();
DateTime dtNow = DateTime.Now;
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, this.username.Text, dtNow, dtNow.AddMinutes(30), true, "user", FormsAuthentication.FormsCookiePath);
string encryptedTicket = FormsAuthentication.Encrypt(ticket);
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket));
Response.Redirect(FormsAuthentication.GetRedirectUrl(this.username.Text, true));
}
What am I doing wrong (or what am I missing)?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Hi All,
Can i have c sharp code for a datagrid that updates itself every to 10 seconds on a web page?
So that data can be dispalyed as it get updated from a table.
Thank you very much
Regards
|
|
|
|
|
Can be done very simply using JS. Just perform the DataGrid's data binding in Page_Load and add this to the page within a script tag:
setInterval("document.forms[0].submit();", 10000);
Clean code is the key to happiness.
|
|
|
|
|
Thank you very much for your response.
I am not that good in JS.Do you think i should get the Java script code in Test.aspx ?where exactly? is it in the page _load event?
Please advice.
Thank you
regards
|
|
|
|
|
Hi,
Thank for your response.Let me expain it a bit further
Say i have a server process which listens for some changes in database.
When a change occurs i want to refresh my page in browser by notyfinig it.
I do not want to refresh my page i.e. every 5 seconds, i just want to refresh it ONLY on server change just like desktop applications do.
The problem is that refreshing evry n seconds has to much impact on my web server. The refresh action should be taken only when something really happens that makes sense
Is it possible ?
|
|
|
|
|
hi guys.. i just opened a new asp webform and wrote "hello world" in the wysiwyg editor of visual studios 2005 and ran it, and it worked fine in my system. but when i uploaded it to my website it is showing an error page asking me to put a customerror tag with mode set to "off" and i did exactly as it said <customerrors mode="Off"> but still it is showing the exact same error page... what is the problem ... my web hoster do has an asp server running..
|
|
|
|
|
This error is masking the true error you are recieving as the Web.config file of your application has the customErrors tag mode attribute not set to "off". Open the Web.config file of your application and update the customErrors tag as follows:
<customErrors mode="Off" />
Clean code is the key to happiness.
|
|
|
|
|
hii newc1 thanx for replying. but i figured the source of the problem..
its not with the code.. its the prob with the webhosters.. the asp server which was running was 1.0 where as mine required 2.0 so iv asked them to upgrade it.. hopefully things should get normal once it is upgraded..
|
|
|
|