|
in the first thank you
i know what you speaking about but
i am a developer not a customer and that a customer request
and i can not change his beliefs
note ----
the question not for log out specially
i am sorry it for how to open connection with data base
thanks for your help again
ahmed eldeghedy
|
|
|
|
|
Hello Guys,
I want to build a web page that looks like some sort of search web site with navigational boxes(like by people, by place, etc) on left hand side and actual document content on the centre of the page, all this data will come from a service call as an xml file dynamically.
So I am looking for some help on which controls I can use on asp.net 2.0 or 3.5 to pick the data segments from the xml file and display it on the web page and also be able to do post backs if i want to navigate on any control.
Can anyone help me with any example code to achieve this?
Many Thanks
happy coding!
|
|
|
|
|
You have some XML data that you want to display correct? Use XSLT to transform your XML into HTML and write it to the page. If they are standard HTML input controls, like a submit button the postback will be triggered.
only two letters away from being an asset
|
|
|
|
|
I am creating a couple of textboxes and dropdownlists dynamically. I need to put RFV for all of them. Since the rfv id will be different for each control, how will I generate them and make them fire if the values are not entered by the user. I tried adding the following:
RequiredFieldValidator rfv1 = new RequiredFieldValidator();
rfv1.ControlToValidate = fieldTextBox.Id;
But this is not firing? ANy help in this regard please?
Thanks,
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote:
RequiredFieldValidator rfv1 = new RequiredFieldValidator();
rfv1.ControlToValidate = fieldTextBox.Id;
But this is not firing? ANy help in this regard please?
I have write this on Page_Load()
<br />
RequiredFieldValidator _re = new RequiredFieldValidator();<br />
_re.ID = "test";<br />
_re.ControlToValidate = txtRoll.ID;<br />
_re.ErrorMessage = "This is a error Message";<br />
form1.Controls.Add(_re);
and working fine
|
|
|
|
|
give some error message for your required field Validator like
rfv1.ErrorMessage ="Some Message"
|
|
|
|
|
In Gridview
CaseNo ,HearingDate,To,CC,BCC
this data is shown. CaseNo is Primary Key
I am having button "SendMail" in that grid view.
In gridview Rowcommand Event i write this code
if i click on first row send mail command button then
Label9.text get First caseno t.e. "LER/111"
Simillarly i want To,CC BCC Cell value of that row
How i can able to get that
<br />
Protected Sub MailDetailsGridView_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles MailDetailsGridView.RowCommand<br />
''Code Added For The Send Mail........<br />
If (e.CommandName = "SendMail") Then<br />
<br />
Label9.Text = e.CommandArgument.ToString()<br />
<br />
Dim row As GridViewRow<br />
row = CType(CType(e.CommandSource, Control).NamingContainer, GridViewRow)<br />
Dim email As String = CType(row.Cells(6), DataControlFieldCell).Text<br />
<br />
If (row.RowType = DataControlRowType.DataRow) Then<br />
Dim txtCCMail As TextBox<br />
Dim ToMail As String<br />
txtCCMail = row.Cells(6).Controls(0).FindControl("ToTextBox")<br />
ToMail = txtCCMail.Text<br />
End If<br />
End If<br />
<br />
End Sub<br />
<br />
|
|
|
|
|
Hi soniasan
TRY this class
Imports System.Net.Mail
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Net
Imports System.Net.Dns
Imports System.Web.UI.Page
Imports System.Math
Imports System.Text.RegularExpressions
Imports System.Data.SqlClient
Public Class MailHelper
''' <summary>
''' Sends an mail message
''' </summary>
''' <param name="from">Sender address</param>
''' <param name="recepient">Recepient address</param>
''' <param name="bcc">Bcc recepient</param>
''' <param name="cc">Cc recepient</param>
''' <param name="subject">Subject of mail message</param>
''' <param name="body">Body of mail message</param>
Public Sub SendMailMessage(ByVal from As String, ByVal recepient As String, ByVal bcc As String, ByVal cc As String, _
ByVal subject As String, ByVal body As String)
' Instantiate a new instance of MailMessage
Dim mMailMessage As New MailMessage()
' Set the sender address of the mail message
mMailMessage.From = New MailAddress(from)
' Set the recepient address of the mail message
mMailMessage.To.Add(New MailAddress(recepient))
' Check if the bcc value is null or an empty string
If Not bcc Is Nothing And bcc <> String.Empty Then
' Set the Bcc address of the mail message
mMailMessage.Bcc.Add(New MailAddress(bcc))
End If
' Check if the cc value is null or an empty value
If Not cc Is Nothing And cc <> String.Empty Then
' Set the CC address of the mail message
mMailMessage.CC.Add(New MailAddress(cc))
End If
' Set the subject of the mail message
mMailMessage.Subject = subject
' Set the body of the mail message
mMailMessage.Body = body
' Secify the format of the body as HTML
mMailMessage.IsBodyHtml = True
' Set the priority of the mail message to normal
mMailMessage.Priority = MailPriority.Normal
' Instantiate a new instance of SmtpClient
Dim mSmtpClient As New SmtpClient()
mSmtpClient.Host = "------"
mSmtpClient.Port = "---------"
mSmtpClient.Credentials = New System.Net.NetworkCredential("-----------", "----------")
' Send the mail message
mSmtpClient.Send(mMailMessage)
End Sub
End Class Use this class
regards
Rajeesh MP
|
|
|
|
|
txtCCMail = row.Cells(7).Controls(0).FindControl("ccTextBox")
txtBCCMail = row.Cells(9).Controls(0).FindControl("bccTextBox")
|
|
|
|
|
hello this is hassan,
I am have deployed my web application in my local webserver mean published website, now i have a global ip something like this http://203.68.77.10 on its port 8080 my website is running like this http://203.68.77.10:8080/website1, from the IIS on the http://203.68.77.10 server the url is redirected to my personal webserver, means if some body type in the url http://203.68.77.10:8080/website1 in the browser it is redirected by IIS manager to my local network i.p something like this 192.168.0.1/website1
Now in my website i used some modal popups that are picked by getting the fully qualified path of the browser and application, when i opened the poup it gives me a javascript error permission denied... the page which the popup is going to access is on my computer and the user sees his url on the screen http://203.68.77.10:8080/website1/default.aspx so what is the cause of this please help me i shall be gratefull to u.. thanks
Hassan Akhtar
|
|
|
|
|
Dear Hassan
U add your js extension in IIS.
|
|
|
|
|
Thank you, Sorry dear didnt get u
Hassan Akhtar
|
|
|
|
|
hi all
I have created a web asp.net application using framework 3.5(VS 2008)..
In My web page i have a gridview and a textbox and one button...
GridView is populated from the page load...
now i will enter a text or a part of text to the textbox and i press the button the cursor should go to that particular word where it is in the gridview...
nt only that,again i press the same button the cursor should go to the next same text if it is there in the gridview...same like it should keep on go to everywhere in the grid...
same like the QuickFind method in the edit menu...
ex:
in gridview there is a text as "Value"
if i enter "Value" in the textbox it sould go and if enter any part of this text also the cursor shoul go to that particular part....
how can i do this?...
thanks in advance...
|
|
|
|
|
please anybody help me to solve this problem....
|
|
|
|
|
download problem from Secure Sockets Layer enabled site(https)
I got error message this
"
internet explorer was not able to open this internet site.this requested site is either unavailable or cannot be found .please try later"
i ca't download file
i am using following code
to download the file
string outputFile = "test 1";
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "inline; filename=test.xls" );
Response.AddHeader("Pragma", "public");
Response.AddHeader("Cache-Control", "max-age=0");
Response.Charset = "";
EnableViewState = false;
Response.Write(outputFile);
Response.End();
it's working normal http site,
in https site it's not working ,means i deployed as Secure Sockets Layer enabled site, error happen
mohamad rafi
|
|
|
|
|
Hey guys,
Is it possible to get the number of current connections to a website using .net?
If so, what's the assembly I need for it, I haven't managed to find anything through google yet, but I may be using all the wrong terms...
Thanks in advance.
Mark
|
|
|
|
|
AFAIK you have to keep track of this yourself using the Session_Start and Session_End event handlers in global.asax - somethign along these lines[^]
|
|
|
|
|
Excellent,
Thats exactly what I'd just decided to do.
Thanks for the reply, at least I know I'm on the right track...
|
|
|
|
|
How to select a cell in a gridview without using the autogenerate select button property.What I need to do is to show a particular field (column)in hyperlink.On clicking that hyperlink I need to perform some action..PLease help...how to do it???
|
|
|
|
|
I am not sure about your problem. But if you just want to show the hyperlink in gridview then you can use itemtemplete and place the control there.
But if you want to perform some action on click of the hypelink then better you can use link button control. If you just want the user to redirect to another page then hypelink will suffice the need.
Apurva Kaushal
|
|
|
|
|
|
on page refresh the button onclick event is getting fired.
i tried doing blur() in javascript but in vain. please help me out.
|
|
|
|
|
Your question is not clear. Please explain it in detail if you are expecting help.
|
|
|
|
|
After clicking save button i am inserting data in database.and also clearing the textboxes.now if the user clicks f5 then the page loads again and the click event of the button is fired and again same value gets into the database.
|
|
|
|
|
Well, this is because browser keeps the post data in cache. But when you press refresh, browser is asking for a confirmation, right?
To overcome this issue, you can redirect to a separate page which shows some message like "Value inserted successfully". Since the page is moved, browser will clear the post data from it's cache.
Following pseudo code will explain what I meant
void button_click(object sender,EventArgs args)
{
Response.Redirect("success.aspx");
}
|
|
|
|