|
Success!
Thanks to WebRequest!
string result = "http://www.codeproject.com/";<br />
HttpWebRequest loHttp = (HttpWebRequest)WebRequest.Create(result);<br />
<br />
HttpWebResponse loWebResponse = (HttpWebResponse)loHttp.GetResponse();<br />
<br />
StreamReader loResponseStream = new StreamReader(loWebResponse.GetResponseStream());<br />
<br />
string tmp = loResponseStream.ReadLine();<br />
while (tmp != null)<br />
{<br />
ListBox1.Items.Add(tmp);<br />
tmp = loResponseStream.ReadLine();<br />
}<br />
<br />
loWebResponse.Close();<br />
loResponseStream.Close();
Thanks for the help 
|
|
|
|
|
Hi,
In my project I have 3 forms. Home.aspx, CreateInfo.aspx and CreateInfoNext.aspx. CreateInfo and CreateInfoNext I have defined Back link button. when click on back link button it display previous page.
this working fine. but my problem is I have some validators in each page.
am validating on server side and displaying it under ValidationSummery field validator. If I gave some thing wrong in one field and click on Next button, it is validating and showing error and it is not forwarding to other page.Its OK. Now I entered right text and click on next button it is validating and going to other page. This is ok. the real problem is when I click back button it should go to previous page.it is going but showing error messages under ValidationSummery field validator.
pls see the follwing code:
<asp:LinkButton CausesValidation="false" ID="linkButtonBack" CssClass="linkbold" PostBackUrl="javascript:history.back();" runat="server">< <%=resourceManager.GetString("CMN_TOP_BACK")%></asp:LinkButton>
pls help me in this.
Thanks
|
|
|
|
|
Heh... I had the same problem...
I changed all my RequiredField validators to Red Label's, and manually checked them...
RangeValidators were more... Interesting...
if the RangeValidator is checking textBox1 for a value, just go:
textBox1.Text = "";<br />
Response.Redirect("www.google.co.za");
Since the textBox is empty, the RangeValidator is ignored...
Although, if you find some OTHER way to do this (Possibly keeping the RequiredField Validators), please give me a yell
- Reelix
|
|
|
|
|
Hi Everyone,
In my application i am using Label and DropdropList, on the selection of Dropdownlist,the label is disappear from the Form.
i am using like this
<div>
<asp:label id="L_Country" runat="server" />
</div>
<div>
<asp:ropDownList ID="DDL_LCD_Country" runat="server" OnSelectedIndexChanged="DDL_LCD_Country_SelectedIndexChanged"
AutoPostBack="true" >
<asp:ListItem Text="Select Country"></asp:ListItem>
</asp:DropDownList>
</div>
Please help me, where i am making mistake.
|
|
|
|
|
Well, first you've not shown any code that will hide the label. Second, do you NEED to do an autopostback, or is that only to hide the label ? If you need to postback anyhow, then in DDL_LCD_Country_SelectedIndexChanged, set L_Country.Visible = false. BTW, your naming standard is really nasty, does a company enforce that ?
If you don't need the postback, do it in javascript.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
What you are doing in the "DDL_LCD_Country_SelectedIndexChanged"?
Apurva Kaushal
|
|
|
|
|
try
{
foreach (DataRow row in tableRows)
{
[some codings.......................]
label1:
foreach (DataColumn dc in tableColumns)
{
[some codings.......................]
}
}
[some codings.......................]
}
catch (SqlException ae)
{
[some codings.......................]
goto label1;
}
finally
{
CloseConnection();
}
while executing the above.. i m getting error like "No such label 'label1' within the scope of the goto statement"
how to achieve it? - KARAN
|
|
|
|
|
well, you've found out for yourself just how nasty code can get when you use goto.
1 - you don't have a label called label1 in this code
2 - I see no reason for you to use a goto here, in any case.
I have never used goto in code, not once. I have also never written code to avoid goto. I have instead avoided some nasty constructs.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
goto is unstructured programming. You may need to consider revising your design for better programming constructs instead.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
how to overcome it...?
actually i want to pass my control from catch block to for loop as i mentioned in my code....
|
|
|
|
|
Woudn't a continue to take to the next iteration of the loop accompanied by an if condition to check for statements from the start of the loop to the current label position help you out?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Do you know how I can link scrollbars of two textboxes. What I need to do, is to move the scrollbar of textbox1 when the scrollbar of textbox2 is moved and visa vesa.
|
|
|
|
|
You'd need to check if you can catch a scroll event on a textbox in javascript, then when one scrolls, scroll the other one if it's not at the same scroll pos. You need to check first tho, or you risk creating an endless loop
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi All,
What are the datatypes that can be supported in developing web serivces. Means what datatypes of .net I can use to develop web services.
Thanks,
Aleem Mohammad.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Anything that can be serialised, including your own structs.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
How can I display a Modal Popup window in ASP.Net using vb.net 2005. I had used the code bellow to show a popup window.
ClientScript.RegisterStartupScript(Me.GetType, "popup", "window.showModalDialog('abc.aspx','_blank','height=450px,width=625px,menubar=no');", True)
But this code creates a problem i.e., when i click on a button on the popup window it again displays the same form in another window non modally. And if i open the window non modally i.e., using the code bellow i dont get any errors.
ClientScript.RegisterStartupScript(Me.GetType, "popup", "window.open('abc.aspx','_blank','height=450px,width=625px,menubar=no');", True)
Please Help how to prevent this.
Thanks in advance.
Sekhar
|
|
|
|
|
check the parameter for Window.showModalDialog..
Amit Agarwal
|
|
|
|
|
Hi Friends,
I am using Atlas update panel in which i have my server controls such as text boxes and check boxes. I also have a button inside that update panel.when i click the button all the values are insertecd into the database table.But the thing is i am failing to get the return message in my front end label after the insertion is done..i.e i need to display in the label as "Successfully inserted".I have also written code for it.But it is not working..What might be the problem.Someone help in this regard..
Thanks & Regards,
Balaguru
|
|
|
|
|
Try this:
((Label)UpdatePanel1.FindControl("Label1")).Text ="Successfully inserted";
|
|
|
|
|
hello Friend
I want to search a user in Active Directory relatede to which which Group .
for Example
Group(A,B,C,D)
A-1,2
B-1,23
C-2,3
D-1
users
1
2
3
4
Then I want to Find List of Group NAme which have user1 in Active Directory
It is Possible Please Hlp me.
Thanks
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
hi,
i have used asp.net 2005 with c# language.i need a help. tat i would like to insert text box and dropdownlistbox. textbox for from date and todate.dropdownlist for department values..i have written storedprocedure...so automaticaly in the runtime it takes the parameter textbox... even if i put textbox and dropdownlist as my wish it wont consider the textboxvalue and dropdownvalue as a parameter...
so any one help me to do this...it should not take text box for date and department fields automaticaly.. instead of that how can i place textbox and dropdownlist for parameter...
so based on that only the datas should be shown.....
so pls help me....
k.priya
|
|
|
|
|
Can u write this in egest way what u want
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
what are u saying? i cant get u...
k.priya
|
|
|
|
|
can u explain this in Easy or layman language?
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|