|
Where is the issue ? What UI components you use, and what DB you connect to, are surely two different things ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
I have to connect three gridview and on the selection of row in the grid view it shud jump to the second grid view and vice-versa......For this I have hidden field in the grid view which takes the unique "ID" value and passes it to the next page. in the next page i use it with the help of query string and Programitically create second Grid view data source.
For e.g. CATEGORY->SUBCATEGORY1 works fine
SUBCATEGORY1->SUBCATEGORY2 DOESNT WORK...
It gives me this error
Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
|
|
|
|
|
disable the EnableEventValidation to false. I think this is the way to overcome from this error.
|
|
|
|
|
that i did....bt its still givning error
|
|
|
|
|
how did you bind your grid,could you post your code...
use postback to bind your grid
if (!IsPostBack)
{
//Bind grid with query string id
}
|
|
|
|
|
If Not IsPostBack Then
Dim id As Integer = Request.QueryString("id1")
Dim db As Database = DatabaseFactory.CreateDatabase("See2Buy")
Dim cmd As String = ("Select CategoryID, SubCat2 from Categories where CategoryID=" + id.ToString())
Dim rdr As IDataReader = db.ExecuteReader(CommandType.Text, cmd)
GridView1.DataSource = rdr
GridView1.DataBind()
End If
|
|
|
|
|
This is depressing on so many levels. No-one is paying for this code, right ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Disabling event validation is bad. Quoting MSDN[^],
It is strongly recommended that you do not disable event validation. If you do disable event validation, make sure that no postback could be constructed that could have an unintended effect on your application.
This validation examines the post data and ensure the values supplied are known. You probably will be modifying some values at client side and this error will occur. So I guess you need to rethink your design.
|
|
|
|
|
Hello, I'm developing a ASP.net web page that will be deployed in production as http://apps.mycompany.com/mypage.aspx. I have to include header SSI available through a URL - http://testserver/global/header.html.
If I use the INCLUDE directive with the VIRTUAL keyword, I'm not getting the intended result. I'd appreciate if somebody can help me with how I can include the header from this URL into my page. Thanks in advance!!
|
|
|
|
|
I am populating a drop down list from AD, which is working fine (The drop downlist is populated when I browse to the site.) The problem I am having is that when I later go to use that data with dropdownlist.SelectedItem.Text, nothing is returned. Any suggestions?
Dim Groups1 As New DirectorySearcher<br />
Dim GroupSearchRoot1 As New DirectoryEntry("LDAP://OU=SomeOU,OU=SomeOU,OU=SomeOU,DC=SomeDomain,DC=SomeTopLevelDomain")<br />
<br />
With Groups1<br />
<br />
.SearchRoot = GroupSearchRoot<br />
.Filter = "(&(ObjectClass=Group)(CN=SomeGroup))"<br />
End With<br />
<br />
Dim Members1 As Object = Groups1.FindOne.GetDirectoryEntry.Invoke("Members", Nothing)<br />
<br />
For Each Member As Object In CType(Members1, IEnumerable)<br />
Dim CurrentMember1 As New DirectoryEntry(Member)<br />
dropdownlist.Items.Add(CurrentMember1.Name.Remove(0, 3))<br />
<br />
Some code to sort the dropdownlist alphabetically...
|
|
|
|
|
This looks messy and complicated. I also don't see any code to stop it running every postback, or any indication where it runs. If you run this code in page load, it resets the data source, and thus will cause the selection to be lost.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
The site is simply a one page form with a submit button, basically a web form for employees to use for new user requests. On submit a specifically crafted email is sent to our ticketing system creating a ticket for the various IT groups involved in New User setups. The ticketing system sends an email to an "Authorized Manager" asking for approval for the request. The drop down list is a list of Authorized Managers.
Currently the site is in prod, with a hard coded list of Authorized Managers, I am trying to improve it by using AD Security groups so that I don't have to manually maintain the list.
Should I ditch the above code and try something else, or is there some way that I can salvage it? I am just a script monkey Sys Admin trying his hand at "actual" prgramming to improve process.
|
|
|
|
|
Sorry for the vague question but I have a DLL that is my UI package from another project, now before I start a new project I wish to know, is porting over vb.net custom controls to asp.net controls relatively easy and straightforward as I'm making it out to be, or is there some complexity that wouldn't be apparent to me.
|
|
|
|
|
EliottA wrote: is porting over vb.net custom controls to asp.net controls relatively easy and straightforward
I don't know what you mean by that. The question does not make any sense.
VB.NET is a language, that happens to use the .NET Framework, of which ASP.NET is a part.
Are you confusing the language with WinForms? (Another part of the .NET Framework concerned with windows forms applications)
|
|
|
|
|
Sorry again for the confusion, yes my UI library was made for Win Forms, and I wish to use the same control set in an asp.net project without rewriting all the controls, can this library be shared across win forms and asp.net projects or would that be an improper design?
|
|
|
|
|
You want to use some of your vb.Net winform controls to your asp.net project ?
|
|
|
|
|
Well yes.. just to keep the same look without rewriting every control used..
I take it I'm walking down the wrong path here?
|
|
|
|
|
Yes.
Think about it a little. They are two separate environments that require separate types of rendering, and thus coding. An ASP.NET control can be written as a collection of html tags which wouldn't render on a WinForm. Likewise, a WinForm control could be written to make use advanced GDI+ methods that would not be able to be rendered in the browser.
only two letters away from being an asset
|
|
|
|
|
There is a requirement in my page to store the bytearray temporarily in some way and later use the same for insertion.
There is a fileupload functionality in my page and the bytearray stores the filesize. Since I need to insert the filesize into database only after some conditions met, I need to store this temporarily. Can anybody please help me regarding this?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
yes you can but you should consider using the Session instead.
|
|
|
|
|
meeram395 wrote: bytearray temporarily in some way and later use the same for insertion.
meeram395 wrote: Since I need to insert the filesize into database only after some conditions met, I need to store this temporarily
So, all that time you are in the same page ? and what would be the file Size ?
It this scenarios, I will suggest to use seesion.
|
|
|
|
|
Hi
I got one task in my project..i am new to C# technolgies..Please suggest me some way,..
I have some fields
ssn,Firstname,lastname,Dayofbirth,Dayofmonth,Dayofyear,sex,Fathers surname,father intials
and i have some search conditions to search the data..like
1.Fname,Lanme ,Doy
2.Lname,Fatherssurname,DOB,DOM,DOY
3.ssn..etc
when the user enter the values and clicks submit button the vluea are matching with any of my search condition i have to generate xml file and send to the task table in database..
How can i do that ???
first i want to create xml file..how to do tht ?
after creating xml file..i have to write looping statement right??my condittion statement like how??
if(!ssn=null)
{
??
}
|
|
|
|
|
You might want to check out the XML DOM tutorials at www.w3schools.com
|
|
|
|
|
To create an XML file you can use LINQ.
It's like your Database Query....You can learn it easily also it is very useful.
Otherwise you have to take care of child elements and sub elements and so on...with a hell lot of conditions in LOOPS.
It's not enough to be the best, when you have capability to be great....
|
|
|
|