|
I am on a project that is using MVC for ASP.NET.
I want to validate which release of System.Web.Mvc currently exists in the project (release 3, release 4, etc.).
Does the MS release number have any correlation to the AssemblyFileVersion attribute that they assign to the assembly?
This is the AssemblyFileVersion that currently displays for System.Web.Mvc through Reflector:
[assembly: AssemblyFileVersion("1.0.30714.0")]
Is there any correlation here or is there another way to validate the MVC release number?
|
|
|
|
|
Hello everyone, I am a entry-level programmer that is having some trouble and hoping you guys can help me out. I am trying to add active directory authentication to an existing website. However every attempt has resulted in multiple errors. I was hoping someone could help walk me through all the areas that need to be changed, in the code as I said i'm an entry-level so I need to learn as much as I can. Thanks in advance to all that contribute to this solution. Which pages should I upload for you guys to get an idea of whats going on...I assume you need web.config as well as the C# login page code? Is that all...
|
|
|
|
|
I am designing an admin page to insert/edit information into a MS-SQL database. When I enter my page in 'edit mode' my DetailsView layout is fine and my TextBoxes are about 80%. When I enter in 'insert mode' however, my layout is not so nice, the TextBoxes shrink down to about 20%. I have been searching for a way to fix this and nothing is working. I have a feeling this is a very easy fix and I am just missing it. I would appreciate any help I could get on this, thanks in advance. I have included a portion of the code, I tried to keep it as small as possibe and still show enough information. Again thanks in advance.
<pre>
<asp:DetailsView ID="detailsCatagory" runat="server" Height="50px" Width="750px" AutoGenerateRows="False" DataSourceID="ObjectDataSource1" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" AutoGenerateInsertButton="True" DataKeyNames="ID" DefaultMode="Insert"
HeaderText="Catagory Details" OnModeChanged="detailsCatagory_ModeChanged">
<Fields>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID"></asp:BoundField>
<asp:BoundField DataField="AddedDate" DataFormatString="{0: d}" HeaderText="AddedDate" InsertVisible="False" ReadOnly="True" SortExpression="AddedDate"></asp:BoundField>
<asp:BoundField DataField="AddedBy" HeaderText="AddedBy" InsertVisible="False" ReadOnly="True" SortExpression="AddedBy"></asp:BoundField>
<asp:TemplateField HeaderText="Title" SortExpression="Title">
<EditItemTemplate>
<asp:TextBox ID="textTitle" runat="server" Text='<%# Bind("Title") >' MaxLength="256" Width="99%"></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="textTitle" runat="server" Text='<%# Bind("Title") %>' MaxLength="256" Width="99%"></asp:TextBox>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="labelTitle" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
</ItemTemplate>
<;/asp:TemplateField>
</pre>
|
|
|
|
|
what is the difference between runtime error and compile time error?
What is the difference between static and read only?
Can any one explain with simple examples?
Santhapur
|
|
|
|
|
Do your own homework.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Thanks
|
|
|
|
|
Santhapur wrote: Confused
Your question is a very basic question that is often asked in a beginning computer programming course. What do you think a runtime error and compile error is?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
hmm yeah i know what is runtime error and compile time error. like 1/0 but i need some clear explanation
|
|
|
|
|
What is the difference between static and readonly/
|
|
|
|
|
Santhapur wrote: What is the difference between static and readonly/
Again, this is a very basic introductory computer programming question commonly found in an intro course. What do you think the differences are? Tell what you think it is, and someone may gladly let you know if you are correct or not.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
hi. i've got problem with imageButton. i've got a textBox and imageButton. i'm writing something in textBox and after press enter button on keyboard. when i press enter button i want to run "ImageButton_Click" event. i put panel on my page and put textBox and imageButton. i write code shown below. but when first page open there is no problem but second page open ımagebutton_click event dos'nt run. after first page open i write something textbox and press enter it runs but when i write second word textbox and press enter, ımagebutton_click dosn't run.
this is my code behind:
protected void Page_Load(object sender, EventArgs e)
{
Page.Form.DefaultButton = aaAraImageButton.UniqueID;
Page.SetFocus(aaAranacakKelimeTextBox);
aaArananKelimeLinkButton.Visible = false;
aaArananKelimeLinkButton.Text = aaAranacakKelimeTextBox.Text;
}
this is my HTML
<asp:Panel id="Panel1" runat="server" Width="700px" Height="50px" DefaultButton="aaAraImageButton">
<asp:TextBox id="aaAranacakKelimeTextBox" runat="server" Width="583px" Font-Size="X-Large" Font-Bold="True" ForeColor="#C00000" EnableTheming="True" MaxLength="30"></asp:TextBox>
<asp:ImageButton id="aaAraImageButton" tabIndex=1 onclick="aaAraImageButton_Click" runat="server" ImageUrl="~/resimler/sozluk/ara(35-35).gif" AlternateText="Kelimeyi Ara"></asp:ImageButton></asp:Panel>
|
|
|
|
|
I want to automatically select a certain tree node when the tree control is rendered.
Do I have to inject some javascripting code? is it possible from the server-side?
Thank you in advance...
Niko
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
modified on Thursday, September 18, 2008 10:15 AM
|
|
|
|
|
Maybe this will work:
NewNode.SelectAction = TreeNodeSelectAction.Expand;
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
I want the tree not to be selected, not expanded.
so when the tree is displayed, a postback is generated, as if the user clicked on the node itself to select it.
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
|
|
|
|
|
Hi All,
I have button on my aspx page and I want to call the button click event through java script method without any page postback.
How can I do this.
I am trying to do this as follows
document.getElementById('buttonid').onClick; but it is not in my case.
Please help me.
Thanks in Advance
Alok...
|
|
|
|
|
Well the state of your page will change if you run a piece of javascript code
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
|
Hi all,
I am trying convert Gridview into Image. I am getting ArgumentException(Parameter is invalid) when i pass that memorystream object to Image.FromStream().
Please help me how to fix this error.
Here is my code
btn_GenImageOfGridview()
{
//Bind Gridview
gview.DataSource = mydatasource;
gview.DataBind();
//variable declaration
Response.Clear();
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite);
gview.RenderControl(htmlWrite);
string s = stringWrite.ToString();
byte[] arrByte = new byte[s.ToCharArray().Length];
int i = 0;
foreach (char ch in s.ToCharArray())
{
arrByte[i] = (byte)ch;
i++;
}
System.IO.MemoryStream ms = new System.IO.MemoryStream(arrByte);
System.Drawing.Image returnImage = System.Drawing.Image.FromStream(ms, false,true); //Here i am Getting above Exception.returnImage.Save(@"D:\image.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
}
Please help me how to fix that error.
Thanks in advance.
Cheers,
sekhar
|
|
|
|
|
you're kidding right?? You're expecting the rendered HTML of a gridview to magically become an image just because you're loading that HTML into an image?
Sorry buddy, it ain't gonna happen!
|
|
|
|
|
Is there any other way to achieve this.
I mean i have to capture gridview as Image.
|
|
|
|
|
Print Screen.
That really is an awful question.
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
Thanks .netman.
My requirement is to convert only Gridview into Image. Not the Entire page or Screen, these are i already did it.
If you know any other way to do that, let me know.
|
|
|
|
|
sekhar.k wrote: Is there any other way to achieve this.
No, there is not any built-in method for doing this. Certainly expeecting the HTML to render as an image is not going to work as stated.
About the only way I can think of doing this is to create a blank Bitmap, and draw a table using the GDI+ drawing methods. You could read the columns/rows from your gridview and replicate this on the bitmap.
|
|
|
|
|
Hi,
i have problem in ie6 with the onfocus event.The onblur and onfocus event execute some javascript code. The problem is , in mozzilla this work ok, in ie6 work only for some objects.
Fe: for the companyname textbox the browser didnt apply this 2 events, the select object work fine.
Can u help me in this problem?
I add this event to my object fr5om code behind:
in page load :
..
Me.companyname.Attributes.Add("onFocus", "changehint('hint1',2)")
Me.companyname.Attributes.Add("onBlur", "check_field('companyname',this.value,'hint1')")
Me.state.Attributes.Add("onfocus", "changehint('hint4',2)")
Me.state.Attributes.Add("onblur", "check_field('state',this.value,'hint4')")
My aspx page looks like this
...
<table style="text-align:left;">
<tbody>
<tr class="row">
<td ><asp:Label ID="txtcompanyname" runat="server" Text="name + form"></asp:Label>*
<br /><asp:Label ID="obs_name" runat="server" Font-Size="9px"></asp:Label></td>
<td><asp:TextBox ID="companyname" runat="server" ></asp:TextBox>
</td>
<td>
<span id="hint1" class="hintForRegistration ">
<asp:RequiredFieldValidator CssClass="hinttext" ID="reqname" Display="Dynamic" runat="server" ControlToValidate="companyname" ErrorMessage="error1"></asp:RequiredFieldValidator>
<asp:label ID="Label0" runat="server" CssClass="hinttext"></asp:label></span>
</td>
</tr>
<tr class="row">
<td><asp:Label ID="txtcompanycounty" runat="server" Text="county"></asp:Label>*</td>
<td>
<select id="state" runat="server" >
<option selected="selected" value=""></option>
<option value="Baranya">Baranya</option>
</select></td>
<td>
<span id="hint4" class="hintForRegistration ">
<asp:label CssClass="hinttext" ID="Label3" runat="server"></asp:label>
</span>
</td>
</tr>
The javascript code change hintbox style on onfocus or onblur event:
function changehint(elem,type,label)
{
var hint = document.getElementById(elem);
hint.style.visibility = "visible";
if (type == 1)
{hint.className='hintForRegistration red';}
else if (type == 2)
{hint.className='hintForRegistration orange';}
else if (type == 3)
{hint.className='hintForRegistration blue';
hint.innertext = 'OKSA!';}
}
function check_field(thefield,thevalue,thehint)
{
if (thefield == "companyname" || thefield == "state" || thefield =="companystreet" || thefield =="companycity")
{if (validate_anytext(thevalue)) changehint(thehint,3)
else changehint(thehint,1)
}
else if (thefield == "companymail")
{if (validate_email(thevalue)) changehint(thehint,3)
else changehint(thehint,1)
}
else if (thefield == "companypass1" || thefield == "companypass2")
{if (validate_pass(thevalue)) changehint(thehint,3)
else changehint(thehint,1)
}
else changehint(thehint,3)
}
thanks
|
|
|
|
|
If this is a direct copy of your code, your solution may be really simple: check casing when assigning the attributes to Me.CompanyName. You have "onFocus" in that control, but "onfocus" in the State control.
Have faith in yourself; amateurs built the Ark, professionals built the Titanic.
|
|
|
|