|
How we can call javascript funtion in row databound event of gridview.
Looking forward for your reply...
Thanks in Advance...
Pinna
|
|
|
|
|
e.Row.Attributes.Add(event,javascript)
ex: e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='blue'");
Errors are like Mini Skirts, shorter they get, more revealing they become.
|
|
|
|
|
Hi Friends,
In select html control,how to clear optgroup values(option group values)? Kindly help me.....
Thanks & Regards
Senthil Kumar.T.S
|
|
|
|
|
Perhaps you need to iterate the all option value and deselect it. I think is not possible in single shot.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
hi
is it possible to get an ASP element with javascript?
I'm trying to get the text of an asp textbox (or the value of input type text) that is nested within an ASP TemplateField .
thanks in advance
j
|
|
|
|
|
Yes , First find the control bby control id like :
var obj=document.getElementById('Controlid').vlaue;
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
but how can i predict the control id as ASP elements don't have a predetermined id? (i can't use the 'ID' attribute as opposed to the HTML id attribute)
|
|
|
|
|
You can use document.getElementById(fieldID).
Errors are like Mini Skirts, shorter they get, more revealing they become.
|
|
|
|
|
thanks but please see my reply to Parwej above..
j
|
|
|
|
|
hi dude,
suppose the textbox id is txtname
give like this
var name = document.getelementbyid(txtname).value;
here txtname-->controlid as mentioned by parwej
u got it now
T.Balaji
|
|
|
|
|
sorry if i'm missing something or wasn't clear enough : I need the id for an ASP control that within a GridView (as mentioned - nested within asp:TemplateField)
so for example if my code is:
<asp:TextBox runat="server" ID="txtName">>
after rendering the TextBox id will be something like:
"ctl00_ContentPlaceHolder1_gridView_ctl12_txtName"
thanks
|
|
|
|
|
We are using crystal report and asp.net.
We have used a hyperlink in a crystal report field to open an aspx page for which values are passed in query string(URL) "/test/default.aspx?Parameter="+{value1}
But the link opens in the same window.
how to open the link in a new window? can it be achieved using <a> tag?
Thanks in advance
Jey
modified on Tuesday, October 28, 2008 11:05 AM
|
|
|
|
|
Resolved this issue by using the property 'HyperlinkTarget' of the Crystal report viewer control.
By default this value is '_self'; Changed it into '_blank'. Now the hyperlink in Crystal report is opening in a new window.
Thanks.
Jey
|
|
|
|
|
Hi,
I have used the Visual Studio ASP.NET configuration tool to add users to my web site...
1) How can I reset a user's password from the tool?
I then deploy my web site to my server...
2) How can I add further users from IIS?
|
|
|
|
|
dbbtvlzfpz wrote: 2) How can I add further users from IIS?
You can still do this through your developing software i.e. VWD and click on the configuration tool.
Not sure about your first question, I am interested in doing that too.
|
|
|
|
|
Hi
I want to display an asp.net calender control, showing only the current week. Can you please assist me here.
Thanks
Mbu
|
|
|
|
|
Do you mean you only want to be able to see the current week or you want the current week to be highlighted?
|
|
|
|
|
I only want to see the current week.
|
|
|
|
|
I'm using asp.net membership provider in my web application.
I have set a role called "Admin" that creates new users for the application and specifies the role of each user.
In my application I have folders with the name of each role with permissions that only users in a certain role can access this folder.
My problem is that I want to set permissions on my users but these permissions could be later changed.
For example I have a menu that contains: "Admin", "Delete", "Add"
And I want Tom to only access the admin pages and I want John to access "Delete" and "Add" pages. And later on these permissions could be changed and Tom may access all. So I wanted a flexible way to do this and not just a fixed way like creating folders and setting permissions and roles on them.
So, I wanted to create a page for viewing all my users and specifying the functions that each user can perform on the site. Like a grid with "Users" and "Functions" columns and radio buttons to specify what each user can perform.
But I can't imagine how this is possible..With the menu that should appear on each user's page..
Can any one point out how this could be done?
|
|
|
|
|
Hi,
A while back I saw a nice walkthrough of a registration page that regiser a user using Memberships and roles classes. I also provided email authentication, whereby a user can authenticate his registered account via email authentication.
The basic concept was to use the ID provided by the Membership classes, and append this info to a link emailed to the user. Hence, data is basically passed in the link. On the page load, this user was basically enabled via the data passed.
So basically you'll have a link like:
http:
and when you receive this link, you basically get the value xxxx-xxxx-xxxx-xxxx-xxxx-xxxx, and enable the user. (Like this)
ActivateUser (Request. QueryString["User"].ToString())
where ActivateUser is a function that accepts the UserID and activates that user.
I know all this sounds dodgy, because you parse the user id, but there is NO way for the user to know that ID, and for him to geuss it, he needs to geuss millions and millions of times...
Can someone perhaps give me a link to a tutorial like this?
Kind regards,
Hugo Human.
|
|
|
|
|
Erhm, what tutorial do you want. Do you want the code written for you so you only have to implement it yourself or something like that? The idea what you want seems to be pretty straight forward an quite easy to do. We can help you is you have questions about code or something like that, however we're not going to develop your application..
|
|
|
|
|
He doesnt want you to develop his app, he wants a tutorial.
|
|
|
|
|
|
aahh... thanks, that's a good one !
This is what I did...
protected void PostRegister_Click1(object sender, EventArgs e)
{
if (!(String.IsNullOrEmpty(UserName.Text) || String.IsNullOrEmpty(RegisterBox.Text)))
{
MembershipUser user = Membership.GetUser(UserName.Text.ToString());
if (user == null)
{
user = Membership.CreateUser(UserName.Text.ToString(), "gendac!@#", RegisterBox.Text.ToString());
user.IsApproved = false;
Membership.UpdateUser(user);
}
else
return;
String email = RegisterBox.Text.ToString();
string link = "http://localhost:32781/" + "Confirmation.aspx?UserID=" + user.ProviderUserKey.ToString();
try
{
System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();
mail.From = new MailAddress("hugo@gendac.co.za");
mail.To.Add(email);
mail.Subject = "Click the link to register.";
mail.Body = link;
SmtpClient smtp = new SmtpClient("127.0.0.1");
smtp.Credentials = new NetworkCredential("hugo", "blaaaaa");
smtp.Send(mail);
}
catch (Exception ex)
{
System.Diagnostics.Trace.WriteLine(ex.Message);
}
}
}
and then to confirm
public partial class Confirmation : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String userKey = (Request.QueryString["UserID"].ToString());
Guid guid = new Guid(userKey);
if (userKey != null)
{
MembershipUser user = Membership.GetUser(guid);
if (user != null)
{
user.IsApproved = true;
Membership.UpdateUser(user);
Message.Text = String.Format("Welcome {0}, you are now registered", user.UserName);
}
else
Message.Text = String.Format("Invalid user ID");
}
}
}
Seems to work fine .... do you guys see any loop holes... ?
|
|
|
|
|
How to check popup window closed or with in that link button is clickedd or not.it mence-after displaying popup window if user close or click on link button with in the popup window the varible xyz should set to 1 value. it meance
if(popup.close==true)
{
xyz=1;
}
or
if(popup.linkclick==true)
{
xyz=1;
}
|
|
|
|