|
Hello guys
I want to know how to dsplay a frameless window in ASP.NET 3.5?
Also how do I display a popup (.aspx) window from an aspx page which will receive some values to display from the calling .aspx page?
I also wan to know how to display a popup window as a tooltip whenever an input control receives focus in asp.net 3.5 just like the one I noticed while I was posting a question at MSDN forum.
Lastly, how do I go about integrating users discussion forum in my website project.
I will grately appreciate your full support.
Tunsten
|
|
|
|
|
The way to make a window frameless, is to not open a window at all, but show a floating div.
If it's a floating div the values will be there automatically, but if you show a popup, you can use javascript to pass values to the parent
The thing you saw in MSDN is a floating div.
You write a discussion forum and add it to your site.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks Christian Graus.
I really appreciate your point but on creating a frameless window but I don't know how to go about it. I will appreciate a sample code if you have or a resourcesful link on the subject.
Once again, thank you.
|
|
|
|
|
subject : mail via webclient to inbox but mail via smtpclient to spam
scenario 1 -
I use System.Net.Mail.SmtpClient to send email from gmail address (A) to gmail address (B)
scenario 2 -
I use gmail web client(gmail.com) to send email from gmail address (A) to gmail address (B)
(A)
in both scenarios the email ends up in sent items in gmail account (A)
(B)
In scenario 1 the email ends up in spam box in gmail account (B)
In scenario 2 the email ends up in inbox in gmail account (B)
Question : Why doesnt the email end up in inbox in both scenarios?
server = smtp.gmail.com
port = 587
enablessl = true
UseDefaultCredentials = false
Credentials is set to "emailaddress@gmail.com", "passxxccc"
descriptive tags : aspx.net, smtp, smtpclient, gmail
|
|
|
|
|
Here's what I got:
Working on an electronic version of our employment application. I'm on the last page of the application, which displays everything that the user has inputted into the app with a chance to make any changes to what they have entered. Each section of the application on this page is broken down into groups of ajax update panels with one panel to display the current information (which is pulled from session variables) and one panel that hold controls to change the information and save it back to session. On the section for the applicant's address information, I am able to pull everything correctly except when I take the session variable for their State and try to set it to the selected value of the drop down list, which is data bound to a database table that holds the state's abbreviation (which is the pk of the table) and the state's name. The value of the drop down list is the abbreviation, which is what is saved in the session value.
Now, I've tried two ways to set the selected value, with the session variable and by reading the database and setting it that way. Both ways don't work. The only thing I can think could pose the problem is that I'm inside of an update panel, but that doesn't make sense. Has anyone else seen this before?
|
|
|
|
|
Aptiva Dave wrote: I've tried two ways to set the selected value, with the session variable and by reading the database and setting it that way. Both ways don't work.
Can you post your code when you set selected value of dropdownlist?
Thanks
please don't forget to vote on the post that helped you.
|
|
|
|
|
Here it is. I've taken out the code that loads some of the other information from the session variables:
If Not IsPostBack Then
''load address info
lblStreet.Text = Session("Street").ToString
txtStreet.Text = Session("Street").ToString
lblCity.Text = Session("City").ToString
txtCity.Text = Session("City").ToString
'pull state name from database
Dim rdr As SqlDataReader = GetReader( _
"select * from States where stateID = '" & Session("State").ToString & "'")
Try
While rdr.Read
lblState.Text = rdr("Name").ToString
dropState.SelectedValue = rdr("stateID").ToString
End While
Catch ex As Exception
lblState.Text = Session("State").ToString
Finally
rdr.Close()
End Try
lblZip.Text = Session("Zip").ToString
txtZip.Text = Session("Zip").ToString
If Session("County").ToString <> "Null" Then
lblLblCounty.Visible = True
lblLblCounty.Text = "<label>County</label><br />" & _
"<label class=""displayLbl"">" & Session("County").ToString & "</label>"
lblCountyEdit.Visible = True
txtCounty.Visible = True
txtCounty.Text = Session("County").ToString
End If
End If
|
|
|
|
|
Hi All,
I need to add " " i.e. break for every 10characters of text in label which we are binding data from Database.so that the after every 10th character remaining characters will come in next line.
i wrote a code but if we have to enter characters as multiples of 10 else it gives error
my code is:
public static string WrappableText(string source)
{
//string nwln = Environment.NewLine;
//return source.Replace(nwln, "<br />");
ArrayList StringList = new ArrayList();
int a=0;
for (int i = 1; i <= 10; i++)
{
StringList.Add(source.Substring(a, 10));
a += 10;
}
System.Text.StringBuilder newstring = new System.Text.StringBuilder();
while (StringList.Count>0)
{
newstring.Append(StringList[0].ToString() + "<br>");
StringList.RemoveAt(0);
}
return newstring.ToString();
}
Is it possible to do?
Can any one help me?
Thanks In Advance
yamuna
modified on Thursday, October 8, 2009 10:46 AM
|
|
|
|
|
Well, you should have told us what the error was. This code is terrible.
yamunarani wrote: ArrayList
Why use an arraylist ? Is this ASP.NET 1.0 ?
yamunarani wrote: StringList.Add(source.Substring(a, 10));
Here is your problem. You assume there's 10 characters. Of course you'll get an error if there is not. Work out the string length in code instead.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
I know that the problem is with the code i used StringList.Add(source.Substring(a, 10));
i tried in other way too,but i dint get the required solution it is failing in other way
if any one knows the exact solution plz reply me
thanks in advance
yamuna
|
|
|
|
|
TRY THIS ONE.
public string WrappedString(string Source)
{
int count = 0;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (char c in Source)
{
count++;
sb.Append(c);
if (count == 10)
{
count = 0;
sb.Append("< br >");
}
}
return sb.ToString();
}
please don't forget to vote on the post that helped you.
|
|
|
|
|
I have a textbox inside an AJAX updatepanel. The textbox has autopostback
set to true and the textchanged event declared.
When I come into the page, I pre-load the textbox with a value. If I
change the value and either tab or click away, the event is fired,
however, the textbox.text value has my OLD value not the new value I have
just entered.
My Code is like this
<asp:UpdatePanel Id="Upd1" runat="server">
<ContentTemplate>
<table>
<tr>
<td>
<asp:TextBox ID="txtUser" runat="server" AutoPostBack="true" OnTextChanged="txtUser_TextChanged">
</asp:TextBox>
</td>
<td>
<asp:TextBox ID="txtPwd" runat="server">
</asp:TextBox>
</td>
</tr>
</ContentTemplate>
</UpdatePanel>
modified on Thursday, October 8, 2009 11:48 AM
|
|
|
|
|
Good Day
Put a Break point in your text-changed event and Debug it. please Post your code in the text-changed event and maybe we can help you there.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
is it good practice to store dataset in session.
|
|
|
|
|
No, but it is a good practice to read this[^], look at #3
only two letters away from being an asset
|
|
|
|
|
Sneha Bisht wrote: is it good practice to store dataset in session.
It Depends on the size of DataSet. What you are going to store in DataSet ? If this is normal user information its always better to use in normal variable rather than dataset.
As per the data size of concern try to avoid dataset, datatable to store in session.
|
|
|
|
|
Datasets Are Expansive.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Usually you'd store an id in the session and use that to define what dataset you need to get from the database.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Respected,
Add Calender Control In Asp.Net GridView Control without PostBack The Page
|
|
|
|
|
Sorry, did you have an actual question ?
I THINK you want to know how to add a calendar control that doesn't do a postback when you select. Just find a javascript one online and put it into your page.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hi,
I am using Text file. Using StreamWriter I am writing some line in the file.
Then I close that file using StreamWriter.Close()
After the closing the file. I am again opening the same file for reading purpose.
I read some data for checking and again write into the same file using StreamWriter. At that time is showing me error "Cannot write to closed Textwriter".
I want to use the same file for writing.How can i do?
Thanks
Sjs
|
|
|
|
|
This has nothing to do with ASP.NET. Create a new streamwriter, apparently you can't reopen one you closed.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi,
I dont know which framework are u using? but if u r using framework 3.5, I recommed u to use the streamreader and streamwriter objects in using keyword e.g.,
using (StreamWriter sw = new StreamWriter(path))
{
sw.WriteLine("This");
sw.WriteLine("is some text");
sw.WriteLine("to test");
sw.WriteLine("Reading");
}
using (StreamReader sr = new StreamReader(path))
{
while (sr.Peek() >= 0)
{
Console.WriteLine(sr.ReadLine());
}
}
Hope this helps.
Regards,
Atif Ali Bhatti.
|
|
|
|
|
i have hide a div using jquery like $("#div1").hide(); in $(document).ready{};
when mypage loads this div shows once then hide.
One person's data is another person's program.
--J.Walia
|
|
|
|