|
You can do it two ways:
1. return the both values separated by some special character like |-| and then split it in the parent page.
2. you can set the field of the parent window from within the modal dialog box like:
top.opener.document.getElementById('field1').value = field1;
top.opener.document.getElementById('field2').value = field2;
-----
|
|
|
|
|
thanks u sir now i used the first one of which u sent .its working now.sir how i can get the iframe source code with html starting and ending tags in another page
|
|
|
|
|
In the declarative catalog part i have a image control. When i add the image in webpartzone in the catalog displaymode at runtime, The image control is displayed without the image.
Similarly in dropdownlist, the list items are not displaying.
You can't do everything...
But you can do something...
So never refuse to do something that you can.....
|
|
|
|
|
Hi the follwoing coding i used for my menu controls...,
This things i have already said in my backend code part...,
Suppose this headings and subtabs and that links are coming from database...,
How to mention that one here?????,
It means the the main menu its contained submenu and while clicking that that sub menu transfer to that url all from my table way...,
How to do that?,
Plz help me,
'Adding here main tabs
Dim _Text As ArrayList = New ArrayList
_Text.Add("Admin")
_Text.Add("Guest")
Dim ts As JQD.TabStrip = CType(Me.FindControl("TabStrip1"), JQD.TabStrip)
ts.TabText = _Text
Dim _SubTabText As Hashtable = New Hashtable
'Adding here Sub tabs for that Admin (main) tab
_Text = New ArrayList
_Text.Add("Admin User Login")
_Text.Add("Admin Default Page")
_SubTabText.Add(0, _Text)
'Adding here Sub tabs for that Guest (main) tab
_Text = New ArrayList
_Text.Add("microsoft")
_Text.Add("oracle")
_SubTabText.Add(1, _Text)
ts.SubTabTextCol = _SubTabText
AddHandler ts.SelectionChanged, AddressOf Me.ts_SelectionChanged
Private Sub ts_SelectionChanged(ByVal sender As Object, ByVal e As JQD.TabStrip.SelectionChangedEventArgs)
'Assigning links for that sub tabs
Dim TabPos As Integer = e.TabPosition
Dim SubPos As Integer = e.SubTabPosition
Select Case (TabPos)
Case 0
If (SubPos = 0) Then
src = "Admin1.aspx"
End If
If (SubPos = 1) Then
src = "Admin2.aspx"
End If
Case 1
If (SubPos = 0) Then
src = "Guest1.aspx"
End If
If (SubPos = 1) Then
src = "Guest2.aspx"
End If
End Select
Session("src") = src
End Sub
Regards,
Magi
|
|
|
|
|
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
MailMessage message = new MailMessage(txtFrom.Text, txtTo.Text, txtSubject.Text, txtBody.Text);
SmtpClient emailClient = new SmtpClient(txtSMTPServer.Text);
System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential(txtSMTPUser.Text, txtSMTPPass.Text);
emailClient.UseDefaultCredentials = false;
emailClient.Credentials = SMTPUserInfo;
emailClient.Send(message);
litStatus.Text = "Message Sent";
}
catch (Exception ex)
{
litStatus.Text=ex.ToString();
}
}
i have used this code for sending email to other..
there is a window page and there are many textboxes for them,
for this code i can use my yahoo a/c "from" field. and what i can use in fields SMTPserver,SMTPuser and SMTPpass.
plz helpp me sir
yogesh
|
|
|
|
|
yogesh_softworld123 wrote: for this code i can use my yahoo a/c "from" field. and what i can use in fields SMTPserver,SMTPuser and SMTPpass.
Yahoo won't allow you to use their SMTP server for free. You try Gmail. They allow to do so. check this http://www.codeproject.com/useritems/smtpmail.asp[^]
|
|
|
|
|
Hi How to add some records in array list?,
For ex in static:
i am adding records in arraylist the below format...,
Dim _Text As ArrayList = New ArrayList
_Text.Add("Admin Master")
_Text.Add("HR")
_Text.Add("Purchase")
Suppose this text are in my table...,
Then how to add those in arraylist...,
Regards,
Magi
|
|
|
|
|
Looping through number of rows of table and add rows values in array
for Example
foreach(DataRow dr in ds.Table[0].Rows)
{
arr.Add(dr["AdminMaster"].ToString());
arr.Add(dr["HR"].ToString());
arr.Add(dr["Purchase"].ToString());
}
BesT regArd
pathan
|
|
|
|
|
Hi,
I have a gridview that is populated from my FUsers table. The stored procedure that returns the results sorts it by last name and first name. Now I don't want to change the sorting of the stored procedure. I want to keep it just like it is. But the gridview needs to be sorted by creation date. Is there a way of sorting a gridview so that it displays everything by sorted creation date?
Please cab someone advise.
Thanks
|
|
|
|
|
If you are using SqlDataSource then set its property "DataSourceMode=DataSet" then SqlDataSource does all that you need.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
I'm using a object data source like below:
<asp:objectdatasource
id="odsUsers"
="" selectmethod="GetAllUsers" typename="Flowers.BusinessLogicLayer.FUser" runat="server">
I don't use a data set, it's generic lists like:
public static List<fuser> GetAllUsers()
{
return FUserDA.GetAllUsers();
}
I hope you can help.
Thanks
|
|
|
|
|
Right, would suggest the following:
Change your List to generic List<Flowers.BusinessLogicLayer.FUser> and adding an anonymous method, so you end up with:
List<Flowers.BusinessLogicLayer.FUser> fusers = FUserDA.GetAllUsers();
fusers.Sort(delegate(FUser f1, FUser f2)
{
return Comparer<DateTime>.Default.Compare(f1.CreationDate,
f2.CreationDate);
});
return fusers;
Cheers
Ben
|
|
|
|
|
Hi
What object are you binding the GridView to?
If it's a DataSet, then you can change it to bind to the DefaultView of the table within it ds.Tables[0].DefaultView.
Then before you do this, you can call ds.Tables[0].DefaultView.Sort("CREATIONDATE DESC").
Cheers
Ben
|
|
|
|
|
Hi,
Please see my reply to _ * _ =>
Thanks
|
|
|
|
|
Hi everyone, I have problem with AccessKey. I created the following code.
It works fine in IE but it fails to work with firefox.
Any solution?
<asp:label skinid="LabelColumn" id="LabelCode" associatedcontrolid="CodeTextBox" accesskey="C" runat="server" text="<u>C</u>ode:">
<asp:textbox id="CodeTextBox" runat="server" text="<%# Bind("Code") %>" maxlength="20">
Thank you
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
It's my same qus. I am not pick the Text through query string.
I have write this code.
String StrCom;
StrCom=Convert.ChangeType(Request.QueryString.GetValues("Pivid")(0),String);
Label5.Text = StrCom;
Display Two Error: Method Name Expeced and String is type but is used to
like a variable
Please Correct This Syntax
|
|
|
|
|
u use this its working yaar
string StrCom = Request.QueryString["CID"];
Label1.Text = StrCom;
and send me how u passing qry string and send url which contain text.
Piyush Vardhan Singh
|
|
|
|
|
I have been trying this code for One hour.
Pick a Value not for text.
|
|
|
|
|
it workin on mysd what ur query string url where u pic this text send me
Piyush Vardhan Singh
|
|
|
|
|
Hi friend
Can I run a code when my webform is closing? I want to send "Bye" to a computer in network when user close the form.
thanks
|
|
|
|
|
You can use the onunload event to do something when the user leaves the page. You have to keep track of why the user is leaving, though, as the event is triggered regardless of why the user is leaving the page. Even a postback counts as leaving the page.
You have to make a request to communicate with the server, either by opening a new window, or using AJAX.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
on unload event which is in the body tag there i am calling the meeeage box .which is appearing for all the buttons.Why it is happening?
and one more thing , i have a function defined i the code behind file , how can i call that funcion on closing the form , i mean on closing the form i am getting the confirm message , if the user click the yes button , at that moment i want to execute that funciton.
How should i do it?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: on unload event which is in the body tag there i am calling the meeeage box .which is appearing for all the buttons.Why it is happening?
As I said, the event is triggered whenever the user leaves the page, regardless of the reason.
Sonia Gupta wrote: and one more thing , i have a function defined i the code behind file , how can i call that funcion on closing the form , i mean on closing the form i am getting the confirm message , if the user click the yes button , at that moment i want to execute that funciton.
As I said, you have to send a request to the server, either by opening a new window or using AJAX.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
hi ,
i am designing an indexing server.here i want to display the values based on wildcards.
plz help me to write the command for display the wildcard values in indexing server results using asp.net
with regards
venkat
|
|
|
|
|
I'm coding login and logout pages.My problem is,first i login with username "A" and then logout.After that i login with another username "B" but login page didn't redirect to index.aspx and i cannot log in anymore.-*-
i think it's about cache of each pages.but i don't known where to fixed it.
for LogIn.aspx
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (CheckAuthenticate(Login1.UserName, Login1.Password))
{
Session["Username"] = Login1.UserName;
Session["Password"] = Login1.Password;
Session["Authentication"] = "1";
if (Login1.RememberMeSet)
{
Response.Cookies["AuthenCookies"]["User"] = Login1.UserName;
Response.Cookies["AuthenCookies"].Expires = DateTime.Now.AddMonths(1);
}
e.Authenticated = true;
FormsAuthentication.RedirectFromLoginPage((string)Session["Username"]
, false);
}
else
{
Session["Authentication"] = "0";
e.Authenticated = false;
}
}
for LogOut.aspx
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Session["Username"] = null;
Session["Password"] = null;
Session["Authentication"] = null;
Session.Abandon();
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
In Page_Load function of each pages, i added this code.
Response.Cache.SetCacheability(HttpCacheability.NoCache);
string LoginPass = (string)Session["Authentication"];
if (LoginPass == "0" || LoginPass == null)
Response.Redirect("LogIn.aspx");
Thank for help. =)
|
|
|
|