|
Your question doesn't made any sense to me. Are you getting the controls not aligned ? Follow W3C standards when designing.
|
|
|
|
|
Hi,
I am trying to grab XML contents using ASP.Net page . But i think i am not getting all the contents of XML but only half. I am using this code.
Response.ContentType = "text/xml";
Response.BufferOutput = true;
//Reads the request and load the string
StreamReader reader = new StreamReader(Request.InputStream);
StrDS = reader.ReadToEnd();
reader.Close();
Then i am putting into one XML file. But any body can guide whteher i am doing right or wrong here. According to specs of the server i should get the more contents.
Then i need to send some response to server like <success> tag. I am sending it but i don't want it to display on the Internet page. Becasue i am displaying some usefull data on it. Code i am using is.
Response.ContentType = "text/xml";
Response.Write("<ErrorList><Success>WEBAPP.dll/XMLPost</Success></ErrorList>");
Response.End();
But this text is always displayed. Can anu body tell me how to send the response without displaying it on IE page
Thanks
Shailesh
|
|
|
|
|
I want to only show a textbox when the clicks a checkbox, i use the autopostback and it shows the textbox, but i want it to hide it if the user deselects the checkbox, any help!!!
Ferron
|
|
|
|
|
Hi,
Heres the code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ControlVisible();
}
}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
ControlVisible();
}
private void ControlVisible()
{
if (CheckBox1.Checked)
{
TextBox1.Visible = true;
}
else
{
TextBox1.Visible = false;
}
}
Thx,
Gayani
|
|
|
|
|
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked)
{
TextBox1.Visible = true;
}
else
{
TextBox1.Visible = false;
}
}
|
|
|
|
|
Hey guys i am not sure why but suddenly i cannot add controls to my webform.. i tried reinstalling but still not possible.
|
|
|
|
|
Check if the VS is in Debug mode.
|
|
|
|
|
How are you adding them ? You should really add them by typing, not by drag and drop. You're obviously doing somethign wrong.
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 )
|
|
|
|
|
I am not in debug mode.. but by typing the html element ,
<asp:button id="button1" visible="True" text="Button" xmlns:asp="#unknown" />
i notice that only the html controls can work
just that asp controls cannot.
|
|
|
|
|
You need to define 'work' Right now, I feel pretty sure you're doing somethign wrong, but are not explaining yourself well enough for me to know what it is
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 )
|
|
|
|
|
i got it to work but the result isnt what i was looking for. Meaning the asp controls did appear by typing in html. but it gives a fix location and i am unable to move it around at all.
I remember last week i was able to drag the control directly off the toolbox to the webform.aspx but now i cant.
modified on Monday, June 23, 2008 10:42 PM
|
|
|
|
|
zzsoulzz wrote: but it gives a fix location and i am unable to move it around at all.
Welcome to web development. If you do it in the designer, you can drag them about and it will generate css for you. It's far better not to do this, tho, the css that gets generated is not pretty, from memory.
Write css to position your controls.
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 )
|
|
|
|
|
thanks for all the help .. i finally found the problem.. there was an issue clashing with my vs.. so i uninstall ie7 and now it works like magic.
|
|
|
|
|
Hi
I want to do some real time debugging on my development machine(WinXP). I wrote an simple ASP.Net application using Vs2005.net in which the default page is p6count.aspx. None of the machine in my office can access this page. Can any body tell me what settings i need to do to access this page from any other machine within my office ?
I am able to ping my machine from all other machine in my offcie.
Thanks
Shailesh
|
|
|
|
|
VS 2005 creates asp.net project and runs by default inside Cassini not your web server. When you run you application locally, you will see something like http://localhost/<port number="">/p6count.aspx. That is where Cassini serving up your application
what you need to access the page from different machine is http://<your machine="" name="">/<port number="">/p6count.aspx
Yusuf
|
|
|
|
|
What is the Cassini BTW? The problem was with the winXP firewall. I made it off now i can access the p6count.aspx page.
Thanks any way for your time.
|
|
|
|
|
aman2006 wrote: What is the Cassini BTW?
Cassini is a *hidden* web server. It is used by Visual studio 2005 to host you development applications. Prior to VS 2005 Microsoft used to create the actual web applications inside IIS. With 2005 it does not get created until you are ready to publish it.
Here is more info on Cassisni. ^
Yusuf
|
|
|
|
|
I want to insert checkbox data into the database if the checkbox is checked. If the checkbox is not checked then don't insert the checkbox data. Mt code isn't working. Here is the code:
myCommand.Parameters.Add("Department", Data.SqlDbType.VarChar).Value = Department<br />
myCommand.Parameters.Add("Quality", Data.SqlDbType.VarChar).Value = Quality<br />
myCommand.Parameters.Add("Interpersonal", Data.SqlDbType.VarChar).Value = Interpersonal<br />
myCommand.Parameters.Add("Timelines", Data.SqlDbType.VarChar).Value = Timelines<br />
If CheckBox1.Checked Then<br />
myCommand.Parameters.Add("NA", Data.SqlDbType.VarChar).Value = NA<br />
End If<br />
myCommand.Parameters.Add("Comment", Data.SqlDbType.VarChar).Value = Comment<br />
myCommand.Parameters.Add("Domain_Login", Data.SqlDbType.VarChar).Value = UserName<br />
myCommand.Connection = myConnection<br />
myCommand.ExecuteNonQuery()
|
|
|
|
|
is NA an optional parameter in your proc ? What does 'not working' mean ? Does it blow up ? Does it give an unexpected result ? Does it never work out that checkbox1 is checked ?
BTW, for you to put this code in your presentation layer is bad design. I guess the fact that you have a checkbox1 means this is not production code, but still, it's better to form good habits than bad.
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 )
|
|
|
|
|
I am trying to create a Sharepoint web part that will consist of a gridview control. I cannot see any errors when debugging, and no exceptions (apparently) are thrown.
protected override void RenderContents(HtmlTextWriter writer)
{
writer.Write("<table border=\"0\" width = \"100%\"><tr><th>Test Web Part</th></tr><tr><td>");
gv_JobData.RenderControl(writer);
writer.Write("</td></tr><tr><td>");
lbl_Test.RenderControl(writer);
writer.Write("</td></tr></table>");
}
I get the table with it's title, and the test label, but absolutely nothing for the gridview. As I am getting no errors or exceptions, I'm a bit stuck. Any suggestions as to how to find out why the gridviews RenderControl method is called happily, but nothing gets rendered?
|
|
|
|
|
I moved all of my shared dses onto my master page, but have since discovered that by doing so in the designer the GridViews on my other pages (web content form) can't see them. Everything works fine at runtime though.
Is there a more graceful workaround at design time than copy/pasting the data source to refresh the schema, etc?
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
Well, I guess what I need to ask is, why are you using hte designer, and why are you using the designer as a place to store things that have nothing to do with the UI ?
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 )
|
|
|
|
|
I have a UserControl based on a GridView. In a table of four columns, I have two instances of this user control, in columns 2 and four. Regardless of how I specifiy my table sizing (15%, 25%, 15%, 25%), or absolute sizing, the user controls still expand to the size of the text in the widest row in the GridView.
What is the proper way to constrain the size of my u.c., and its contained GridView, to its container, a TD element.
|
|
|
|
|
If length of the text is your problem then you can consider Text Wrapping in that place.
Thanks,
Arindam D Tewary
|
|
|
|
|
The GridView doesn't respect any attempts to fix its column size. Eventually I went with a table and a Repeater.
|
|
|
|